Skip to content

Commit

Permalink
Only test compose for minimal images
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
gerrod3 committed Oct 16, 2024
1 parent 38a3a9b commit b7fa464
Showing 1 changed file with 4 additions and 34 deletions.
38 changes: 4 additions & 34 deletions .github/workflows/pulp_images.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: pulp-oci-images CI

on:
push:
branches:
- latest
workflow_dispatch:
pull_request:
env:
Expand Down Expand Up @@ -56,16 +53,9 @@ jobs:
image_variants: "${{ steps.image_variants.outputs.image_variants }}"
pulp_ci_centos_id: "${{ steps.pulp_ci_centos_id.outputs.pulp_ci_centos_id }}"
steps:
# We do not want to build nightly images unless it's a PR to the latest branch,
# or a branch/dispatch build on the latest branch.
- name: Set the list of image_variants for later jobs
id: image_variants
run: |
if [ "${{ github.base_ref }}" == "latest" ] || [ "${{ github.ref_name }}" == "latest" ]; then
echo "image_variants=[\"nightly\",\"stable\"]" >> "$GITHUB_OUTPUT"
else
echo "image_variants=[\"stable\"]" >> "$GITHUB_OUTPUT"
fi
run: echo "image_variants=[\"stable\"]" >> "$GITHUB_OUTPUT"

- name: Set the temporary image tag
run: |
Expand All @@ -87,16 +77,6 @@ jobs:
- name: Update to the latest pip
run: python -m pip install --upgrade pip

- name: Dispatch workflows on stable branches
if: github.event_name == 'schedule'
run: |
echo ::group::PYDEPS
pip install gitpython requests packaging jinja2 pyyaml
echo ::endgroup::
python .ci/scripts/update_ci_branches.py
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Build images
run: |
podman version
Expand Down Expand Up @@ -257,20 +237,10 @@ jobs:
podman rm pulp
- name: Compose up
if: matrix.app.image_name == 'galaxy-minimal' || matrix.app.image_name == 'pulp-minimal'
run: |
if [[ "${{ matrix.app.image_name }}" == "pulp" || "${{ matrix.app.image_name }}" == "galaxy" ]]; then
# Reuse the folders from the s6 mode tests
FILE="docker-compose.folders.yml"
# We'll pull the web image from a registry since we didn't build it.
if [ "${{ matrix.image_variant }}" == "nightly" ]; then
WEB_TAG="nightly"
else
WEB_TAG="${APP_BRANCH}"
fi
else
FILE="docker-compose.yml"
WEB_TAG="${TEMP_APP_TAG}"
fi
FILE="docker-compose.yml"
WEB_TAG="${TEMP_APP_TAG}"
cd images/compose
sed -i "s/pulp-minimal:latest/${{ matrix.app.image_name }}:${TEMP_APP_TAG}/g" $FILE
sed -i "s/pulp-web:latest/${{ matrix.app.web_image }}:${WEB_TAG}/g" $FILE
Expand Down

0 comments on commit b7fa464

Please sign in to comment.