diff --git a/contrib/container-images/README.rst b/contrib/container-images/README.rst index b56aaf68..4d52b219 100644 --- a/contrib/container-images/README.rst +++ b/contrib/container-images/README.rst @@ -25,12 +25,17 @@ Building an image with buildah You will need to install `buildah `_. -The different scripts to build container images are available in the -`git source repository `_: +The different scripts to build container images are available in the git repository: -- ``fedora-distribution.sh``: Builds an image from Fedora 32 `distribution packages `_ -- ``fedora-pypi.sh``: Builds an image from `PyPi `_ packages on Fedora 32 -- ``fedora-source.sh``: Builds an image from `git source `_ on Fedora 32 +- fedora32-distribution.sh_: Builds an image from Fedora 32 `distribution packages `_ +- fedora32-pypi.sh_: Builds an image from `PyPi `_ packages on Fedora 32 +- fedora32-source.sh_: Builds an image from `git source `_ on Fedora 32 +- centos8-pypi.sh_: Builds an image from `PyPi `_ packages on CentOS 8 + +.. _fedora32-distribution.sh: https://github.com/ansible-community/ara/blob/master/contrib/container-images/fedora32-distribution.sh +.. _fedora32-pypi.sh: https://github.com/ansible-community/ara/blob/master/contrib/container-images/fedora32-pypi.sh +.. _fedora32-source.sh: https://github.com/ansible-community/ara/blob/master/contrib/container-images/fedora32-source.sh +.. _centos8-pypi.sh: https://github.com/ansible-community/ara/blob/master/contrib/container-images/centos8-pypi.sh The scripts have no arguments other than the ability to specify an optional name and tag: @@ -39,7 +44,7 @@ and tag: $ git clone https://github.com/ansible-community/ara $ cd ara/contrib/container-images - $ ./fedora-source.sh ara-api:latest + $ ./fedora32-source.sh ara-api:latest # [...] Getting image source signatures Copying blob 59bbb69efd73 skipped: already exists @@ -89,6 +94,7 @@ You can validate if the container is running properly with podman: $ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bc4b7630c265 localhost/ara-api:latest /usr/bin/gunicorn... 12 seconds ago Up 11 seconds ago 0.0.0.0:8000->8000/tcp api-server + $ podman logs api-server [ara] No setting found for SECRET_KEY. Generating a random key... [ara] Writing default settings to /opt/ara/settings.yaml diff --git a/contrib/centos-8-pypi.sh b/contrib/container-images/centos8-pypi.sh similarity index 100% rename from contrib/centos-8-pypi.sh rename to contrib/container-images/centos8-pypi.sh diff --git a/contrib/container-images/fedora-distribution.sh b/contrib/container-images/fedora32-distribution.sh similarity index 100% rename from contrib/container-images/fedora-distribution.sh rename to contrib/container-images/fedora32-distribution.sh diff --git a/contrib/container-images/fedora-pypi.sh b/contrib/container-images/fedora32-pypi.sh similarity index 100% rename from contrib/container-images/fedora-pypi.sh rename to contrib/container-images/fedora32-pypi.sh diff --git a/contrib/container-images/fedora-source.sh b/contrib/container-images/fedora32-source.sh similarity index 100% rename from contrib/container-images/fedora-source.sh rename to contrib/container-images/fedora32-source.sh diff --git a/tests/with_container_images.yaml b/tests/with_container_images.yaml index 29f4d957..982ae841 100644 --- a/tests/with_container_images.yaml +++ b/tests/with_container_images.yaml @@ -25,14 +25,17 @@ # These are in chronological order of release so that we don't end up # running SQL migrations backwards during the tests. - name: localhost/ara-api - tag: distribution-latest - script: fedora-distribution.sh + tag: fedora32-source-latest + script: fedora32-source.sh - name: localhost/ara-api - tag: pypi-latest - script: fedora-pypi.sh + tag: fedora32-pypi-latest + script: fedora32-pypi.sh - name: localhost/ara-api - tag: source-latest - script: fedora-source.sh + tag: centos8-pypi-latest + script: centos8-pypi.sh + - name: localhost/ara-api + tag: fedora32-distribution-latest + script: fedora32-distribution.sh tasks: - name: Install git, buildah and podman become: yes diff --git a/tests/zuul_publish_dockerhub.yaml b/tests/zuul_publish_dockerhub.yaml index f490392a..d89067d0 100644 --- a/tests/zuul_publish_dockerhub.yaml +++ b/tests/zuul_publish_dockerhub.yaml @@ -23,20 +23,22 @@ images: # These images are meant to be provided by the "with_container_images.yaml" playbook - name: localhost/ara-api - tag: distribution-latest + tag: fedora32-source-latest - name: localhost/ara-api - tag: pypi-latest + tag: fedora32-pypi-latest - name: localhost/ara-api - tag: source-latest + tag: centos8-pypi-latest + - name: localhost/ara-api + tag: fedora32-distribution-latest tasks: - name: Tag images with buildah command: | buildah tag {{ item.name }}:{{ item.tag }} {{ destination }}:{{ item.tag }} loop: "{{ images }}" - - name: Tag latest from source-latest + - name: Tag latest from fedora32-source-latest command: | - buildah tag {{ destination }}:source-latest {{ destination }}:latest + buildah tag {{ destination }}:fedora32-source-latest {{ destination }}:latest - name: Push latest command: |