Skip to content

Commit

Permalink
Hardcode compose images to 3.21
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
gerrod3 committed Oct 8, 2024
1 parent 1d8c61d commit 52ea4e6
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 55 deletions.
84 changes: 35 additions & 49 deletions .github/workflows/pulp_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -74,25 +68,26 @@ 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:
QUAY_BOT_PASSWORD: ${{ secrets.QUAY_BOT_PASSWORD }}
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: |
Expand All @@ -111,43 +106,36 @@ 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
sudo apt-get update -yq
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
Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions images/galaxy/stable/Containerfile.core
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion images/galaxy/stable/Containerfile.webserver
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions images/pulp/stable/Containerfile.core
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion images/pulp/stable/Containerfile.webserver
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 52ea4e6

Please sign in to comment.