Skip to content

Commit

Permalink
test(itest): allow explicit override of itest image tag (#1574)
Browse files Browse the repository at this point in the history
* test(itest): allow explicit override of itest image tag

* default to testing latest image
  • Loading branch information
andrewazores authored Jul 1, 2023
1 parent 5d6a533 commit 0bb8d7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
with:
step: restore
- name: Run integration tests
run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest bash repeated-integration-tests.bash
run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash
- name: Print itest logs
if: failure()
run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<cryostat.itest.webHost>localhost</cryostat.itest.webHost>
<cryostat.itest.podName>cryostat-itests</cryostat.itest.podName>
<cryostat.itest.containerName>cryostat-itest</cryostat.itest.containerName>
<cryostat.itest.imageTag>${cryostat.imageVersionLower}-${build.os}-${build.arch}</cryostat.itest.imageTag>
<cryostat.itest.grafana.containerName>grafana-itest</cryostat.itest.grafana.containerName>
<cryostat.itest.grafana.port>3000</cryostat.itest.grafana.port>
<cryostat.itest.grafana.imageStream>quay.io/cryostat/cryostat-grafana-dashboard</cryostat.itest.grafana.imageStream>
Expand Down Expand Up @@ -615,7 +616,7 @@
<argument>GRAFANA_DASHBOARD_URL=http://${cryostat.itest.webHost}:${cryostat.itest.grafana.port}</argument>
<argument>--detach</argument>
<argument>--rm</argument>
<argument>${cryostat.imageStream}:${cryostat.imageVersionLower}-${build.os}-${build.arch}</argument>
<argument>${cryostat.imageStream}:${cryostat.itest.imageTag}</argument>
</arguments>
<skip>${skipITs}</skip>
</configuration>
Expand Down
5 changes: 2 additions & 3 deletions repeated-integration-tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ if [ -z "${CONTAINER_NAME}" ]; then
fi

if [ -z "${ITEST_IMG_VERSION}" ]; then
ITEST_IMG_VERSION="$(getPomProperty version)"
ITEST_IMG_VERSION="${ITEST_IMG_VERSION,,}" # lowercase
ITEST_IMG_VERSION="latest"
fi

if [ -z "${PULL_IMAGES}" ]; then
Expand All @@ -43,7 +42,7 @@ fi

STARTFLAGS=(
"-DfailIfNoTests=true"
"-Dcryostat.imageVersion=${ITEST_IMG_VERSION}"
"-Dcryostat.itest.imageTag=${ITEST_IMG_VERSION}"
"-Dcryostat.itest.pullImages=${PULL_IMAGES}"
"build-helper:regex-property@image-tag-to-lower"
"exec:exec@create-pod"
Expand Down

0 comments on commit 0bb8d7a

Please sign in to comment.