Skip to content

Commit

Permalink
Remove nightly matrix scenario from PR CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrod3 committed Oct 15, 2024
1 parent 8697dcb commit 647c88c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
13 changes: 2 additions & 11 deletions .github/actions/test_image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ inputs:
image_name:
description: 'Name of the image to be tested'
required: true
image_variant:
description: 'Stable or nightly build'
required: true
default: 'stable'
app_branch:
description: 'The branch the app was built on'
required: true
Expand Down Expand Up @@ -49,13 +45,8 @@ runs:
run: |
if [[ "${{ inputs.image_name }}" == "pulp" || "${{ inputs.image_name }}" == "galaxy" ]]; then
FILE="compose.folders.yml"
# We'll pull the web image from a registry since we didn't build it.
if [ "${{ inputs.image_variant }}" == "nightly" ]; then
WEB_TAG="nightly"
else
# This will be the branch we are running on, either latest or version branch
WEB_TAG="${{ github.base_ref || github.ref_name }}"
fi
# This will be the branch we are running on, either latest or version branch
WEB_TAG="${{ github.base_ref || github.ref_name }}"
else
FILE="compose.yml"
WEB_TAG="ci-amd64"
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,8 @@ jobs:
base-images:
runs-on: ubuntu-latest
outputs:
image_variants: "${{ steps.image_variants.outputs.image_variants }}"
base_cache_key: "${{ steps.build_base_images.outputs.base_cache_key }}"
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
- uses: actions/checkout@v4

- name: Build base images
Expand All @@ -79,7 +67,6 @@ jobs:
strategy:
fail-fast: false
matrix:
image_variant: ${{ fromJSON(needs.base-images.outputs.image_variants) }}
image_name:
- pulp-minimal
- pulp
Expand All @@ -93,14 +80,13 @@ jobs:
uses: "./.github/actions/build_image"
with:
image_name: ${{ matrix.image_name }}
image_variant: ${{ matrix.image_variant }}
image_variant: "stable"
image_cache_key: ${{ needs.base-images.outputs.base_cache_key }}

- name: Test App Image
uses: "./.github/actions/test_image"
with:
image_name: ${{ matrix.image_name }}
image_variant: ${{ matrix.image_variant }}
app_branch: ${{ steps.build_image.outputs.app_branch }}

- name: Logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ jobs:
image_cache_key: ${{ needs.base-images.outputs.base_cache_key }}

- name: Test App Image
if: matrix.image_variant != 'nightly'
uses: "./.github/actions/test_image"
with:
image_name: ${{ matrix.image_name }}
image_variant: ${{ matrix.image_variant }}
app_branch: ${{ steps.build_image.outputs.app_branch }}

- name: Set tags
Expand Down

0 comments on commit 647c88c

Please sign in to comment.