Skip to content

Commit

Permalink
Support for running preflight with multiple tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mariadb-mmontes authored and ekorh475 committed Aug 14, 2024
1 parent b58bfe7 commit 6879e38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/release-ubi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ jobs:
org.opencontainers.image.version=${{ github.event.inputs.version }}
- name: Preflight image
run: make preflight-image-submit
run: |
IFS=',' read -r -a TAGS_ARRAY <<< "${{ github.event.inputs.tags }}"
for TAG in "${TAGS_ARRAY[@]}"; do
echo "Running preflight for \"$TAG\""
PREFLIGHT_IMAGE="$TAG" make preflight-image-submit
done
env:
MXS_VERSION: "${{ github.event.inputs.version }}"
REDHAT_API_KEY: "${{ secrets.REDHAT_API_KEY }}"
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ help:
build-image:
docker build -f Dockerfile -t $(IMAGE_TAG) --build-arg MXS_VERSION=$(MXS_VERSION) .

PREFLIGHT_IMAGE ?= ""
.PHONY: preflight-image
preflight-image: preflight ## Run preflight tests on the image.
$(PREFLIGHT) check container $(IMAGE_TAG) --docker-config $(DOCKER_CONFIG)
$(PREFLIGHT) check container $(PREFLIGHT_IMAGE) --docker-config $(DOCKER_CONFIG)

.PHONY: preflight-image-submit
preflight-image-submit: preflight ## Run preflight tests on the image and submit the results to Red Hat.
$(PREFLIGHT) check container $(IMAGE_TAG)\
$(PREFLIGHT) check container $(PREFLIGHT_IMAGE)\
--submit \
--pyxis-api-token=$(REDHAT_API_KEY) \
--certification-project-id=$(REDHAT_PROJECT_ID)\
Expand Down

0 comments on commit 6879e38

Please sign in to comment.