Skip to content

Commit 259c351

Browse files
committed
Update templated files to rev 71ee593 (#336)
Automatically created PR based on commit 71ee59371b73bfb5f56e98b6dd34c37b216b7c61 in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: fhennig with message [Additional OpenShift Preflight CI Check]
1 parent 48a939f commit 259c351

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ jobs:
285285
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
286286
HELM_REPO: ${{ needs.select_helm_repo.outputs.helm_repository }}
287287
if: needs.select_helm_repo.outputs.helm_repository != 'skip'
288+
outputs:
289+
IMAGE_TAG: ${{ steps.printtag.outputs.IMAGE_TAG }}
288290
steps:
289291
- name: Install protoc
290292
run: |
@@ -310,8 +312,28 @@ jobs:
310312
if: ${{ github.event_name == 'pull_request' }}
311313
run: python/cargo_version.py -m pr${{ github.event.pull_request.number }}
312314

313-
# Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
314-
# default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
315-
# This is needed for the HELM_REPO variable.
315+
# Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
316+
# default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
317+
# This is needed for the HELM_REPO variable.
316318
- name: Publish Docker image and Helm chart
317319
run: make -e publish
320+
# Output the name of the published image to the Job output for later use
321+
- id: printtag
322+
name: Output image name and tag
323+
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> $GITHUB_OUTPUT
324+
openshift_preflight:
325+
name: Run the OpenShift Preflight check on the published images
326+
needs:
327+
- package_and_publish
328+
runs-on: ubuntu-latest
329+
env:
330+
IMAGE_TAG: ${{ needs.package_and_publish.outputs.IMAGE_TAG }}
331+
steps:
332+
- name: Install preflight
333+
run: |
334+
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
335+
chmod +x preflight-linux-amd64
336+
- name: Check container
337+
run: ./preflight-linux-amd64 check container "$IMAGE_TAG" > preflight.out
338+
- name: "Passed?"
339+
run: '[ "$(./preflight-linux-amd64 check container "$IMAGE_TAG" | jq -r .passed)" == true ]'

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ docker-publish:
3535
# TODO remove if not used/needed
3636
docker: docker-build docker-publish
3737

38+
print-docker-tag:
39+
@echo "${DOCKER_REPO}/${ORGANIZATION}/${OPERATOR_NAME}:${VERSION}"
40+
3841
helm-publish:
3942
curl --fail -u "github:${NEXUS_PASSWORD}" --upload-file "${HELM_CHART_ARTIFACT}" "${HELM_REPO}/"
4043

0 commit comments

Comments
 (0)