|
|
9c38422 |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
9c38422 |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
9c38422 |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
9c38422 |
%endif
|
|
|
9c38422 |
|
|
|
9c38422 |
%global module koji_containerbuild
|
|
|
9c38422 |
|
|
|
9c38422 |
Name: koji-containerbuild
|
|
|
9c38422 |
Version: 0.5.5
|
|
|
9c38422 |
Release: 1%{?dist}
|
|
|
9c38422 |
Summary: Koji support for building layered container images
|
|
|
9c38422 |
Group: Applications/System
|
|
|
9c38422 |
|
|
|
9c38422 |
License: LGPLv2
|
|
|
9c38422 |
URL: https://github.com/release-engineering/%{name}
|
|
|
9c38422 |
#Use the following commands to generate the tarball:
|
|
|
9c38422 |
#
|
|
|
9c38422 |
# git clone --single-branch --branch koji-containerbuild-VERSION-RELEASE \
|
|
|
9c38422 |
# https://github.com/release-engineering/koji-containerbuild.git && \
|
|
|
9c38422 |
# cd ./koji-containerbuild && \
|
|
|
9c38422 |
# python setup.py sdist
|
|
|
9c38422 |
#
|
|
|
9c38422 |
#Where:
|
|
|
9c38422 |
#- VERSION is version macro from specfile
|
|
|
9c38422 |
#- RELEASE is release macro from specfile and dist is not defined (empty)
|
|
|
9c38422 |
Source0: %{name}-%{version}.tar.gz
|
|
|
9c38422 |
BuildArch: noarch
|
|
|
9c38422 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
9c38422 |
|
|
|
9c38422 |
BuildRequires: python
|
|
|
9c38422 |
BuildRequires: python2-devel
|
|
|
9c38422 |
BuildRequires: python-setuptools
|
|
|
9c38422 |
|
|
|
9c38422 |
%description
|
|
|
9c38422 |
Koji support for building layered container images
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%package hub
|
|
|
9c38422 |
License: LGPLv2
|
|
|
9c38422 |
Summary: Hub plugin that extend Koji to build layered container images
|
|
|
9c38422 |
Group: Applications/System
|
|
|
9c38422 |
Requires: koji-containerbuild
|
|
|
9c38422 |
Requires: koji-hub
|
|
|
9c38422 |
|
|
|
9c38422 |
%description hub
|
|
|
9c38422 |
Hub plugin that extend Koji to support building layered container images
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%package builder
|
|
|
9c38422 |
License: LGPLv2
|
|
|
9c38422 |
Summary: Builder plugin that extend Koji to build layered container images
|
|
|
9c38422 |
Group: Applications/System
|
|
|
9c38422 |
Requires: koji-builder
|
|
|
9c38422 |
Requires: koji-containerbuild
|
|
|
9c38422 |
Requires: osbs-client
|
|
|
9c38422 |
Requires: python-urlgrabber
|
|
|
9c38422 |
Requires: python-dockerfile-parse
|
|
|
9c38422 |
Requires: python-pycurl
|
|
|
9c38422 |
|
|
|
9c38422 |
%description builder
|
|
|
9c38422 |
Builder plugin that extend Koji to communicate with OpenShift build system and
|
|
|
9c38422 |
build layered container images.
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%package cli
|
|
|
9c38422 |
License: LGPLv2
|
|
|
9c38422 |
Summary: CLI that communicates with Koji to control building layered container images
|
|
|
9c38422 |
Group: Applications/System
|
|
|
9c38422 |
Requires: koji
|
|
|
9c38422 |
Requires: koji-containerbuild
|
|
|
9c38422 |
|
|
|
9c38422 |
%description cli
|
|
|
9c38422 |
Builder plugin that extend Koji to communicate with OpenShift build system and
|
|
|
9c38422 |
build layered container images.
|
|
|
9c38422 |
|
|
|
9c38422 |
%prep
|
|
|
9c38422 |
%setup -q
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%build
|
|
|
9c38422 |
%{__python2} setup.py build
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%install
|
|
|
9c38422 |
rm -rf $RPM_BUILD_ROOT
|
|
|
9c38422 |
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
9c38422 |
%{__install} -d $RPM_BUILD_ROOT%{_bindir}
|
|
|
9c38422 |
%{__install} -p -m 0755 cli/koji-containerbuild $RPM_BUILD_ROOT%{_bindir}/koji-containerbuild
|
|
|
9c38422 |
%{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins
|
|
|
9c38422 |
%{__install} -p -m 0644 %{module}/plugins/hub_containerbuild.py $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins/hub_containerbuild.py
|
|
|
9c38422 |
%{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-builder-plugins
|
|
|
9c38422 |
%{__install} -p -m 0644 %{module}/plugins/builder_containerbuild.py $RPM_BUILD_ROOT%{_prefix}/lib/koji-builder-plugins/builder_containerbuild.py
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%files
|
|
|
9c38422 |
%{python2_sitelib}/*
|
|
|
9c38422 |
%doc docs AUTHORS README.rst
|
|
|
9c38422 |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
9c38422 |
%{!?_licensedir:%global license %doc}
|
|
|
9c38422 |
%endif
|
|
|
9c38422 |
%license LICENSE
|
|
|
9c38422 |
|
|
|
9c38422 |
%files cli
|
|
|
9c38422 |
%{_bindir}/*
|
|
|
9c38422 |
|
|
|
9c38422 |
%files hub
|
|
|
9c38422 |
%{_prefix}/lib/koji-hub-plugins/hub_containerbuild.py*
|
|
|
9c38422 |
|
|
|
9c38422 |
%files builder
|
|
|
9c38422 |
%{_prefix}/lib/koji-builder-plugins/builder_containerbuild.py*
|
|
|
9c38422 |
|
|
|
9c38422 |
%clean
|
|
|
9c38422 |
rm -rf $RPM_BUILD_ROOT
|
|
|
9c38422 |
|
|
|
9c38422 |
|
|
|
9c38422 |
%changelog
|
|
|
9c38422 |
* Fri Dec 04 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.5-1
|
|
|
9c38422 |
- Add README.rst to a release (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use %%global macro instead of %%define one (pbabinca@redhat.com)
|
|
|
9c38422 |
- Require main package in subpackages to always install license file
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Add license directives to subpackages (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Thu Dec 03 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.4-3
|
|
|
9c38422 |
- Simplify inclusion of python modules to get proper owners
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Explicit __python2 definitions on <=rhel6 (pbabinca@redhat.com)
|
|
|
9c38422 |
- Explicit use of python2 and BuildRequires on python2-devel
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- %%defattr macro isn't needed anymore (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use %%license tag for license on RHEL && RHEL <= 6 (pbabinca@redhat.com)
|
|
|
9c38422 |
- Fix permissions for CLI binary (pbabinca@redhat.com)
|
|
|
9c38422 |
- Wrap package descriptions to make rpmlint happy (pbabinca@redhat.com)
|
|
|
9c38422 |
- Replace Requires on osbs with osbs-client (pbabinca@redhat.com)
|
|
|
9c38422 |
- Remove koji Requires from the base package (pbabinca@redhat.com)
|
|
|
9c38422 |
- Replace koji-builder with koji dependency for cli subpackage
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Specify how release tarballs are created (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use build system instead of buildsystem to make rpmlint happy
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Fix name macro in URL (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Fri Nov 20 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.4-2
|
|
|
9c38422 |
- fix spec paths, libdir evals to /usr/lib64/ on 64-bit build hosts which is
|
|
|
9c38422 |
the wrong path for koji plugins (admiller@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Fri Nov 20 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.4-1
|
|
|
9c38422 |
- Reinit curl after fork to properly process incremental logs
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Add support to new LABEL names and make architecture optional
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Fix serious issue: check external rpms for *non*scratch builds
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Catch errors raised by markExternalRPMs and raise it as koji.PostBuildError
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Get list of rpms and repositories only for successful builds
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Download image tarball only if build was successful (pbabinca@redhat.com)
|
|
|
9c38422 |
- Log list of all rpms from osbs response as formatted rpm list
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Refactor: get rpm packages to separate method (pbabinca@redhat.com)
|
|
|
9c38422 |
- Refactor: get docker repositories to separate method (pbabinca@redhat.com)
|
|
|
9c38422 |
- Fail only if build was successful and it haven't generated any tarball
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Improve log write related exception messages (pbabinca@redhat.com)
|
|
|
9c38422 |
- Raise ContainerError exceptions when something goes wrong with osbs logs
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Pass branch and push_url from opts to osbs's create_build()
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Uploader process check if child (which fetches logs) finished
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Overall docs about build architecture (pbabinca@redhat.com)
|
|
|
9c38422 |
- change log msg level to info (mikem@redhat.com)
|
|
|
9c38422 |
- Properly handle empty repositories in osbs response (pbabinca@redhat.com)
|
|
|
9c38422 |
- Wait between new connection/fetch logs (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use get_build_name() instead of build_id to get osbs build id
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Tue Jul 14 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.3-1
|
|
|
9c38422 |
- List repositories in status message of buildContainer task
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Print osbs build id in the error message about failed build
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- If not exactly one image was built leave fail to parent (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use DockerfileParser class from dockerfile_parse module for parsing
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Download docker logs at the end of the build (pbabinca@redhat.com)
|
|
|
9c38422 |
- Try fetch OSBS logs with follow and incrementally upload them
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- If final tarball cannot be downloaded log error and continue
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Accept repo URLs in CLI and pass it in builder plugin to osbs
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Improve error message when there were unexpected number of builds
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Fix: correctly format string before passing to ContainerError
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Fix formatting of README.rst (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Mon Jun 15 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.2-1
|
|
|
9c38422 |
- Use BZComponent LABEL instead of Name (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Fri Jun 12 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.1-1
|
|
|
9c38422 |
- Explicit string conversion before urlgrabber.urlgrab() and more logging
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Explicitly set urlgrab ssl verify options which pycurl expects
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Fri Jun 12 2015 Pavol Babincak <pbabinca@redhat.com> 0.5.0-1
|
|
|
9c38422 |
- Read LABELs from Dockerfile (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Fri Jun 12 2015 Pavol Babincak <pbabinca@redhat.com> 0.4.0-1
|
|
|
9c38422 |
- Download container image via https (pbabinca@redhat.com)
|
|
|
9c38422 |
- Tag package (image) after successful build if not scratch
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Tue Jun 09 2015 Pavol Babincak <pbabinca@redhat.com> 0.3.1-1
|
|
|
9c38422 |
- Add missing import imp (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Mon Jun 08 2015 Pavol Babincak <pbabinca@redhat.com> 0.3.0-1
|
|
|
9c38422 |
- Remove code which always overwrote release (pbabinca@redhat.com)
|
|
|
9c38422 |
- Removed not used imports (pbabinca@redhat.com)
|
|
|
9c38422 |
- Import kojipath from path set via variable not from inspection
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- More debug info: list rpm_packages (pbabinca@redhat.com)
|
|
|
9c38422 |
- Mock image tarball as we don't get this from the buildsystem (yet)
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Pull getting task options to separate method (pbabinca@redhat.com)
|
|
|
9c38422 |
- Pull package (image) whitelist check into separate method
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Reuse image tables and methods for container builds (pbabinca@redhat.com)
|
|
|
9c38422 |
- Don't pass build_tag as separate argument to createContainer task
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Wed Jun 03 2015 Pavol Babincak <pbabinca@redhat.com> 0.2.0-2
|
|
|
9c38422 |
- Don't require python-distutils. distutils is part of python-libs pkg
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Wed May 27 2015 Pavol Babincak <pbabinca@redhat.com> 0.2.0-1
|
|
|
9c38422 |
- Explicitly list code which are hack around database constraints
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- refactor: remove not used code and move comment to better position
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Get name from name of the basename repository for non-scratch builds
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Extend SCM object with get_component() and get_git_uri() and use it
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Use logger to write logs and not sys.stderr.write (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use container_archives not image_archives table (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use attributes of BuildResponse object to query responses
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Connect to osbs logger to print more debug info via own logger
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
- Improve rpm_packages listings (pbabinca@redhat.com)
|
|
|
9c38422 |
- Support non-scratch builds with listing of the contents (pbabinca@redhat.com)
|
|
|
9c38422 |
- builderplugin: import kojid binary as kojid module (pbabinca@redhat.com)
|
|
|
9c38422 |
- builderplugin: Use single handler to OSBS object (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Mon May 18 2015 Pavol Babincak <pbabinca@redhat.com> 0.1.2-1
|
|
|
9c38422 |
- add BuildRoot tag (needed for rhel<6) (mikem@redhat.com)
|
|
|
9c38422 |
- use alternate method to import kojihub (mikem@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Wed May 13 2015 Pavol Babincak <pbabinca@redhat.com> 0.1.1-1
|
|
|
9c38422 |
- Documentation for buildContainer task (pbabinca@redhat.com)
|
|
|
9c38422 |
- In buildContainer task use "container" channel by default
|
|
|
9c38422 |
(pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Wed May 13 2015 Pavol Babincak <pbabinca@redhat.com> 0.1.0-2
|
|
|
9c38422 |
- Bump Release instead of Version (pbabinca@redhat.com)
|
|
|
9c38422 |
- Use BuildArch noarch (pbabinca@redhat.com)
|
|
|
9c38422 |
|
|
|
9c38422 |
* Mon May 04 2015 Pavol Babincak <pbabinca@redhat.com> 0.1.0-1
|
|
|
9c38422 |
- first public release
|