From 52ea4e6e47b8b66df7fdcf958894458da7ce0deb Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Tue, 8 Oct 2024 11:55:34 -0400 Subject: [PATCH] Hardcode compose images to 3.21 [noissue] --- .github/workflows/pulp_images.yml | 84 ++++++++------------ images/galaxy/stable/Containerfile.core | 4 +- images/galaxy/stable/Containerfile.webserver | 2 +- images/pulp/stable/Containerfile.core | 4 +- images/pulp/stable/Containerfile.webserver | 2 +- 5 files changed, 41 insertions(+), 55 deletions(-) diff --git a/.github/workflows/pulp_images.yml b/.github/workflows/pulp_images.yml index aa34f9f1..f8e9e2f4 100644 --- a/.github/workflows/pulp_images.yml +++ b/.github/workflows/pulp_images.yml @@ -17,18 +17,13 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false - matrix: - include: - - image_tag: latest - - image_tag: stable steps: - uses: actions/checkout@v4 with: # by default, it uses a depth of 1 # this fetches all history so that we can read each commit fetch-depth: 0 - - name: Set up Python 3.9 - uses: actions/setup-python@v4 + - uses: actions/setup-python@v4 - name: Install httpie and podman-compose run: | @@ -37,22 +32,21 @@ jobs: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie echo ::endgroup:: echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV - echo "IMAGE_TAG=${{ matrix.image_tag }}" >> $GITHUB_ENV pip install podman-compose shell: bash - name: Build run: | podman version buildah version - buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:latest . - buildah bud --pull=false --file images/pulp/${{ matrix.image_tag }}/Containerfile.core --tag quay.io/pulp/pulp:${{ matrix.image_tag }} . - buildah bud --pull=false --file images/pulp/${{ matrix.image_tag }}/Containerfile.webserver --tag quay.io/pulp/pulp-web:${{ matrix.image_tag }} . + buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:3.21 . + buildah bud --pull=false --file images/pulp/stable/Containerfile.core --tag quay.io/pulp/pulp:3.21 . + buildah bud --pull=false --file images/pulp/stable/Containerfile.webserver --tag quay.io/pulp/pulp-web:3.21 . podman images -a - name: Compose up run: | cd images/compose - sed -i "s/pulp:latest/pulp:${{ matrix.image_tag }}/g" podman-compose.yml - sed -i "s/pulp-web:latest/pulp-web:${{ matrix.image_tag }}/g" podman-compose.yml + sed -i "s/pulp:latest/pulp:3.21/g" podman-compose.yml + sed -i "s/pulp-web:latest/pulp-web:3.21/g" podman-compose.yml sudo usermod -G root $(whoami) podman-compose up -d sleep 30 @@ -74,6 +68,9 @@ jobs: shell: bash env: PY_COLORS: '1' + # These compose images are only pushed to quay & they use the same pulp/pulp repository that + # our latest s6 images use. On this branch our s6 images are tagged all-in-one on quay, see + # publish_images.yaml. - name: Push images if: github.event_name != 'pull_request' env: @@ -81,18 +78,16 @@ jobs: QUAY_BOT_USERNAME: ${{ secrets.QUAY_BOT_USERNAME }} run: | echo "$QUAY_BOT_PASSWORD" | podman login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io - podman push quay.io/pulp/base:latest - podman push quay.io/pulp/pulp:${{ matrix.image_tag }} - podman push quay.io/pulp/pulp-web:${{ matrix.image_tag }} - if [[ "$IMAGE_TAG" == "stable" ]]; then - CURRENT_VERSION=$(podman run quay.io/pulp/pulp:stable bash -c 'pip3 show pulpcore | sed -n -e "s/Version: //p"') - echo $CURRENT_VERSION - podman tag quay.io/pulp/pulp:${{ matrix.image_tag }} quay.io/pulp/pulp:$CURRENT_VERSION - podman tag quay.io/pulp/pulp-web:${{ matrix.image_tag }} quay.io/pulp/pulp-web:$CURRENT_VERSION - podman push quay.io/pulp/pulp:$CURRENT_VERSION - podman push quay.io/pulp/pulp-web:$CURRENT_VERSION - fi + podman push quay.io/pulp/base:3.21 + podman push quay.io/pulp/pulp:3.21 + podman push quay.io/pulp/pulp-web:3.21 + CURRENT_VERSION=$(podman run quay.io/pulp/pulp:3.21 bash -c 'pip3 show pulpcore | sed -n -e "s/Version: //p"') echo $CURRENT_VERSION + podman tag quay.io/pulp/pulp:3.21 quay.io/pulp/pulp:$CURRENT_VERSION + podman tag quay.io/pulp/pulp-web:3.21 quay.io/pulp/pulp-web:$CURRENT_VERSION + podman push quay.io/pulp/pulp:$CURRENT_VERSION + podman push quay.io/pulp/pulp-web:$CURRENT_VERSION + echo "Pushed images pulp/base, pulp/pulp, & pulp/pulp-web with tags 3.21 & $CURRENT_VERSION" - name: Logs if: always() run: | @@ -111,20 +106,14 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false - matrix: - include: - - image_tag: latest - - image_tag: stable steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: # by default, it uses a depth of 1 # this fetches all history so that we can read each commit fetch-depth: 0 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: '3.8' + - uses: actions/setup-python@v4 + - name: Install httpie and podman-compose run: | echo ::group::HTTPIE @@ -132,22 +121,21 @@ jobs: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie echo ::endgroup:: echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV - echo "IMAGE_TAG=${{ matrix.image_tag }}" >> $GITHUB_ENV pip install podman-compose shell: bash - name: Build run: | podman version buildah version - buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:latest . - buildah bud --pull=false --file images/galaxy/${{ matrix.image_tag }}/Containerfile.core --tag quay.io/pulp/galaxy:${{ matrix.image_tag }} . - buildah bud --pull=false --file images/galaxy/${{ matrix.image_tag }}/Containerfile.webserver --tag quay.io/pulp/galaxy-web:${{ matrix.image_tag }} . + buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:3.21 . + buildah bud --pull=false --file images/galaxy/stable/Containerfile.core --tag quay.io/pulp/galaxy:4.6 . + buildah bud --pull=false --file images/galaxy/stable/Containerfile.webserver --tag quay.io/pulp/galaxy-web:4.6 . podman images -a - name: Compose up run: | cd images/compose - sed -i "s/pulp:latest/galaxy:${{ matrix.image_tag }}/g" podman-compose.yml - sed -i "s/pulp-web:latest/galaxy-web:${{ matrix.image_tag }}/g" podman-compose.yml + sed -i "s/pulp:latest/galaxy:4.6/g" podman-compose.yml + sed -i "s/pulp-web:latest/galaxy-web:4.6/g" podman-compose.yml sudo usermod -G root $(whoami) podman-compose up -d sleep 30 @@ -174,17 +162,15 @@ jobs: QUAY_BOT_USERNAME: ${{ secrets.QUAY_BOT_USERNAME }} run: | echo "$QUAY_BOT_PASSWORD" | podman login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io - podman push quay.io/pulp/base:latest - podman push quay.io/pulp/galaxy:${{ matrix.image_tag }} - podman push quay.io/pulp/galaxy-web:${{ matrix.image_tag }} - if [[ "$IMAGE_TAG" == "stable" ]]; then - CURRENT_VERSION=$(podman run quay.io/pulp/galaxy:stable bash -c 'pip3 show galaxy_ng | sed -n -e "s/Version: //p"') - echo $CURRENT_VERSION - podman tag quay.io/pulp/galaxy:${{ matrix.image_tag }} quay.io/pulp/galaxy:$CURRENT_VERSION - podman tag quay.io/pulp/galaxy-web:${{ matrix.image_tag }} quay.io/pulp/galaxy-web:$CURRENT_VERSION - podman push quay.io/pulp/galaxy:$CURRENT_VERSION - podman push quay.io/pulp/galaxy-web:$CURRENT_VERSION - fi + podman push quay.io/pulp/galaxy:4.6 + podman push quay.io/pulp/galaxy-web:4.6 + CURRENT_VERSION=$(podman run quay.io/pulp/galaxy:4.6 bash -c 'pip3 show galaxy_ng | sed -n -e "s/Version: //p"') + echo $CURRENT_VERSION + podman tag quay.io/pulp/galaxy:4.6 quay.io/pulp/galaxy:$CURRENT_VERSION + podman tag quay.io/pulp/galaxy-web:4.6 quay.io/pulp/galaxy-web:$CURRENT_VERSION + podman push quay.io/pulp/galaxy:$CURRENT_VERSION + podman push quay.io/pulp/galaxy-web:$CURRENT_VERSION + echo "Pushed images pulp/galaxy & pulp/galaxy-web with tags 4.6 & $CURRENT_VERSION" - name: Logs if: always() run: | diff --git a/images/galaxy/stable/Containerfile.core b/images/galaxy/stable/Containerfile.core index 58108aad..42bc1efa 100644 --- a/images/galaxy/stable/Containerfile.core +++ b/images/galaxy/stable/Containerfile.core @@ -1,6 +1,6 @@ -FROM quay.io/pulp/base:latest +FROM quay.io/pulp/base:3.21 -RUN pip install galaxy_ng +RUN pip install galaxy_ng~=4.6.0 USER pulp:pulp RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost \ diff --git a/images/galaxy/stable/Containerfile.webserver b/images/galaxy/stable/Containerfile.webserver index 6a86b182..822ab081 100644 --- a/images/galaxy/stable/Containerfile.webserver +++ b/images/galaxy/stable/Containerfile.webserver @@ -1,4 +1,4 @@ -FROM quay.io/pulp/galaxy:stable as builder +FROM quay.io/pulp/galaxy:4.6 as builder RUN mkdir -p /etc/nginx/pulp \ /www/data diff --git a/images/pulp/stable/Containerfile.core b/images/pulp/stable/Containerfile.core index bf4f250e..3879ab53 100644 --- a/images/pulp/stable/Containerfile.core +++ b/images/pulp/stable/Containerfile.core @@ -1,6 +1,6 @@ -FROM quay.io/pulp/base:latest +FROM quay.io/pulp/base:3.21 -RUN pip install pulpcore \ +RUN pip install pulpcore~=3.21.0 \ pulp_ansible \ pulp-certguard \ pulp_container \ diff --git a/images/pulp/stable/Containerfile.webserver b/images/pulp/stable/Containerfile.webserver index bd390072..1e6bc2e7 100644 --- a/images/pulp/stable/Containerfile.webserver +++ b/images/pulp/stable/Containerfile.webserver @@ -1,4 +1,4 @@ -FROM quay.io/pulp/pulp:stable as builder +FROM quay.io/pulp/pulp:3.21 as builder RUN mkdir -p /etc/nginx/pulp \ /www/data