Blob Blame History Raw
# All tests require Internet access
# to test in mock use:  --enable-network --with check
# to test in a privileged environment use:
#   --with check --with privileged_tests
%bcond_with     check
%bcond_with     privileged_tests

Name:           ansible-bender
Version:        0.9.0
Release:        1%{?dist}
Summary:        Build container images using Ansible playbooks

License:        MIT
URL:            https://github.com/ansible-community/ansible-bender
Source0:        %{pypi_source}

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-setuptools_scm
BuildRequires:  python%{python3_pkgversion}-setuptools_scm_git_archive
%if %{with check}
# These are required for tests:
BuildRequires:  python%{python3_pkgversion}-pyyaml
BuildRequires:  python%{python3_pkgversion}-tabulate
BuildRequires:  python%{python3_pkgversion}-jsonschema
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-flexmock
BuildRequires:  python%{python3_pkgversion}-pytest-xdist
BuildRequires:  python%{python3_pkgversion}-libselinux
BuildRequires:  ansible
BuildRequires:  podman
BuildRequires:  buildah
BuildRequires:  git
%endif
Requires:       ansible
Requires:       buildah

%description
This is a tool which bends containers using Ansible playbooks and
turns them into container images. It has a pluggable builder selection
- it is up to you to pick the tool which will be used to construct
your container image. Right now the only supported builder is
buildah. More to come in the future. Ansible-bender (ab) relies on
Ansible connection plugins for performing builds.

tl;dr Ansible is the frontend, buildah is the backend.

%prep
%autosetup


%build
%py3_build


%install
%py3_install


%if %{with check}
%check
PYTHONPATH=%{buildroot}%{python3_sitelib} \
  pytest-3 \
  -v \
  --disable-pytest-warnings \
  --numprocesses=auto \
%if %{with privileged_tests}
  tests
%else
  tests/unit
%endif
%endif


%files
%{python3_sitelib}/ansible_bender-*.egg-info/
%{python3_sitelib}/ansible_bender/
%{_bindir}/ansible-bender
%license LICENSE
%doc docs/* README.md



%changelog
* Mon Jan 11 2021 Packit Service <user-cont-team+packit-service@redhat.com> - 0.9.0-1
- find python tests: bump to f33; add ubi/python (Tomas Tomecek)
- test conf: ansible_user is no longer being set (Tomas Tomecek)
- sync spec file with fedora rawhide (Tomas Tomecek)
- 0.9.0 (Tomas Tomecek)
- tests: drop unused imports (Tomas Tomecek)
- Update pytest binary location (Keith Johnson)
- simplify packit.yaml (Tomas Tomecek)
- update packit.yaml (Tomas Tomecek)
- entrypoint: new build option --build-entrypoint (Tomas Tomecek)
- Documentation and a simple test. (Patrik Smeds)
- Make it possible to set entrypoint for working_container. (Patrik Smeds)
- Exclude tests from installation packages. (Gordon Messmer)
- Install submodules. (Gordon Messmer)
- Fix SyntaxWarning from use of is with string literal. (Gordon Messmer)
- *.md: point to docs correctly (Tomas Tomecek)
- render docs via github.io (Tomas Tomecek)
- Seperate out okd docs and reference it in homepage (K mehant)
- merge features and add m2r package (K mehant)
- Direct import markdown components into read the docs (K mehant)
- Divided docs into small markdown components (K mehant)
- Add sphinx docs with rtd theme for ab (K mehant)
- buildah sanity check to utilize buildah_from_extra_args (Tomas Tomecek)
- vagrant: test on f31 (Tomas Tomecek)

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.8.1-3
- Rebuilt for Python 3.9

* Mon May 18 2020 Gordon Messmer <gordon.messmer@gmail.com> - 0.8.1-2
- Rebuild with fix for missing python modules.

* Mon Apr 27 2020 Gordon Messmer <gordon.messmer@gmail.com> - 0.8.1-1
- Build 0.8.1

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-3
- Rebuilt for Python 3.8

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Wed Jul 03 2019 Gordon Messmer <gordon.messmer@gmail.com> - 0.7.0-1
- Build 0.7.0

* Tue Jul 02 2019 Gordon Messmer <gordon.messmer@gmail.com> - 0.6.1-6
- First build for Fedora