Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,58 +276,9 @@ 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"]
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
37 changes: 37 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,42 @@ jobs:
- name: Check Cache golangci-lint
run: make golangci-lint-cache-status

check-collector-and-scanner-images-exist:
# This job ensures that COLLECTOR_VERSION or SCANNER_VERSION files cannot be updated to a version for which the
# image was not successfully built on Konflux (suffix "-fast"). It also verifies that GHA-built image is there (no
# suffix) so that the failure also happens in this job.
runs-on: ubuntu-latest
strategy:
matrix:
image: ["collector", "scanner", "scanner-slim", "scanner-db", "scanner-db-slim"]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Get image tag from COLLECTOR|SCANNER_VERSION file
id: image-tag
run: |
if [[ "${{ matrix.image }}" == "collector" ]]; then
makefile_target="collector-tag"
else
makefile_target="scanner-tag"
fi
echo "image-tag=$(make --quiet --no-print-directory "${makefile_target}")" >> "${GITHUB_OUTPUT}"

- name: Check GHA-built image exists
uses: stackrox/actions/release/wait-for-image@v1
with:
token: ${{ secrets.QUAY_RHACS_ENG_BEARER_TOKEN }}
image: rhacs-eng/${{ matrix.image }}:${{ steps.image-tag.outputs.image-tag }}
limit: 300

- name: Check Konflux-built image exists
uses: stackrox/actions/release/wait-for-image@v1
with:
token: ${{ secrets.QUAY_RHACS_ENG_BEARER_TOKEN }}
image: rhacs-eng/${{ matrix.image }}:${{ steps.image-tag.outputs.image-tag }}-fast
limit: 300

slack-on-style-failure:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -183,6 +219,7 @@ jobs:
- misc-checks
- style-check
- golangci-lint
- check-collector-and-scanner-images-exist
permissions:
actions: read
steps:
Expand Down
Loading