diff --git a/.github/workflows/test_published_images.yml b/.github/workflows/test_published_images.yml index 8b4d8b85..3407c494 100644 --- a/.github/workflows/test_published_images.yml +++ b/.github/workflows/test_published_images.yml @@ -6,6 +6,7 @@ on: inputs: IMAGE_VERSION: required: true + description: A version, `latest` etc EXPECTED_HZ_VERSION: required: true @@ -36,28 +37,22 @@ jobs: - name: Login to Docker Hub run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - # TODO REMOVE - - uses: aws-actions/configure-aws-credentials@v4 + - uses: madhead/semver-utils@latest + id: version with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 + version: ${{ inputs.IMAGE_VERSION }} - name: Run smoke test against EE image timeout-minutes: 10 run: | - # TODO REMOVE - set -x - # TODO Check with shellcheck - # shellcheck source=../.github/scripts/abstract-simple-smoke-test.sh . .github/scripts/abstract-simple-smoke-test.sh # TODO Make dynamic #expected_hz_version=${{ inputs.EXPECTED_HZ_VERSION }} - expected_hz_version=5.5.0 + expected_hz_version=5.5.2 # tag_elements=("${{ inputs.IMAGE_VERSION }}") - tag_elements=("5.5.0") + tag_elements=("5.5.2") if [[ -n "${{ matrix.variant }}" ]]; then tag_elements+=("${{ matrix.variant }}") @@ -80,8 +75,6 @@ jobs: ;; "ee") image_name="hazelcast-enterprise" - export HZ_LICENSEKEY=${{ secrets.HZ_ENTERPRISE_LICENSE }} - export HZ_INSTANCETRACKING_FILENAME=instance-tracking.txt ;; *) echoerr "Unrecognized distribution type ${{ matrix.distribution_type }}" @@ -89,24 +82,28 @@ jobs: ;; esac - # Slim builds are not published to other repos - if [[ "${{ matrix.distribution_type }}" == "ee" && -z "${{ matrix.variant }}" ]]; then - - - echo "Testing NLC" - echo "${{ secrets.NLC_REPO_TOKEN }}" | docker login -u ${{ secrets.NLC_REPO_USERNAME }} ${{ secrets.NLC_REPOSITORY }} --password-stdin - simple-smoke-test "${{ secrets.NLC_REPOSITORY }}/hazelcast_cloud" "hazelcast-nlc" - - # TODO Will conflicts with https://github.com/hazelcast/hazelcast-docker/pull/812 - echo "Testing OCP" - - # TODO REMOVE - echo "echo ${{ secrets.OCP_LOGIN_PASSWORD }} | docker login -u ${{ secrets.OCP_LOGIN_USERNAME }} ${{ secrets.HZ_5_EE_RHEL_REPOSITORY }} --password-stdin" >> ${{ github.run_id }}.txt - echo "simple-smoke-test "${{ secrets.HZ_5_EE_RHEL_REPOSITORY }}/hazelcast-enterprise-5-rhel8" ${image_name}" >> ${{ github.run_id }}.txt - aws s3 cp ${{ github.run_id }}.txt s3://jack-s3-bucket/${{ github.run_id }}.txt - - echo "${{ secrets.OCP_LOGIN_PASSWORD }}" | docker login -u ${{ secrets.OCP_LOGIN_USERNAME }} ${{ secrets.HZ_5_EE_RHEL_REPOSITORY }} --password-stdin - simple-smoke-test "${{ secrets.HZ_5_EE_RHEL_REPOSITORY }}/hazelcast-enterprise-5-rhel8" "${image_name}" + if [[ "${{ matrix.distribution_type }}" == "ee" ]]; then + # Check additional EE repos + + export HZ_LICENSEKEY=${{ secrets.HZ_ENTERPRISE_LICENSE }} + export HZ_INSTANCETRACKING_FILENAME=instance-tracking.txt + + # Additional repos are only populated for default variant, not "slim" + if [[ -z "${{ matrix.variant }}" ]]; then + # NLC repo only populated for absolute versions - not latest etc (tested based on earlier parsing) + if [[ -n "${{ steps.version.outputs.major }}" ]]; then + echo "Testing NLC" + echo "${{ secrets.NLC_REPO_TOKEN }}" | docker login -u "${{ secrets.NLC_REPO_USERNAME }}" "${{ secrets.NLC_REPOSITORY }}" --password-stdin + simple-smoke-test "${{ secrets.NLC_REPOSITORY }}/hazelcast_cloud" "hazelcast-nlc" + fi + + # TODO Will conflicts with https://github.com/hazelcast/hazelcast-docker/pull/812 + # echo "Testing OCP" + # TODO Disabled as these are the wrong credentials + # Should use credentials from https://jenkins.hazelcast.com/manage/credentials/store/system/domain/_/credential/redhat-hazelcast-release-engineering-robot/update somehow + # echo "${{ secrets.OCP_LOGIN_PASSWORD }}" | docker login -u ${{ secrets.OCP_LOGIN_USERNAME }} registry.connect.redhat.com --password-stdin + # simple-smoke-test "registry.connect.redhat.com/hazelcast/hazelcast-enterprise-${{ steps.version.outputs.major }}-rhel8" "${image_name}" + fi fi echo "Testing Docker registry"