Skip to content

Commit

Permalink
ROX-27203: Ensure collector/scanner images exist during updates (stac…
Browse files Browse the repository at this point in the history
…krox#13502)

Co-authored-by: Misha Sugakov <[email protected]>
  • Loading branch information
tommartensen and msugakov authored Dec 10, 2024
1 parent bf73d43 commit a21135e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,58 @@ jobs:
path: |
image/rhel/docs
check-collector-images-exist:
# This job ensures that COLLECTOR_VERSION cannot be updated to a version for which
# the image was not successfully built on Konflux.
runs-on: ubuntu-latest
strategy:
matrix:
tag_suffix: ["", "-fast", "-fast-slim"]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Get COLLECTOR_VERSION
id: collector-version
run: |
echo "collector-version=$(make --quiet --no-print-directory collector-tag)" >> "${GITHUB_OUTPUT}"
- name: Check image exists
uses: stackrox/actions/release/wait-for-image@v1
with:
token: ${{ secrets.QUAY_RHACS_ENG_BEARER_TOKEN }}
image: rhacs-eng/collector:${{ steps.collector-version.outputs.collector-version }}${{ matrix.tag_suffix }}
limit: 300

check-scanner-images-exist:
# This job ensures that SCANNER_VERSION cannot be updated to a version for which
# the image was not successfully built on Konflux.
runs-on: ubuntu-latest
strategy:
matrix:
image: ["scanner", "scanner-slim", "scanner-db", "scanner-db-slim"]
tag_suffix: ["", "-fast"]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Get SCANNER_VERSION
id: scanner-version
run: |
echo "scanner-version=$(make --quiet --no-print-directory scanner-tag)" >> "${GITHUB_OUTPUT}"
- name: Check image exists
uses: stackrox/actions/release/wait-for-image@v1
with:
token: ${{ secrets.QUAY_RHACS_ENG_BEARER_TOKEN }}
image: rhacs-eng/${{ matrix.image }}:${{ steps.scanner-version.outputs.scanner-version }}${{ matrix.tag_suffix }}
limit: 300

build-and-push-main:
runs-on: ubuntu-latest
needs:
- check-collector-images-exist
- check-scanner-images-exist
- define-job-matrix
- pre-build-ui
- pre-build-cli
Expand Down
2 changes: 1 addition & 1 deletion COLLECTOR_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.20.x-48-g5a07a9b608
3.20.x-56-g80e2ebfcff

0 comments on commit a21135e

Please sign in to comment.