Build EE snapshot image #4544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build EE snapshot image | |
on: | |
workflow_dispatch: | |
inputs: | |
HZ_VERSION: | |
description: 'Version of Hazelcast to build the image for' | |
required: true | |
HZ_EE_REVISION: | |
description: 'Commit id of Hazelcast Enterprise snapshot jar' | |
required: true | |
env: | |
test_container_name_ee: hazelcast-ee-test | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- variant: slim | |
suffix: '-slim' | |
- variant: '' | |
suffix: '' | |
env: | |
DOCKER_ORG: hazelcast | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: v0.5.1 | |
- name: Build Test EE image | |
run: | | |
docker buildx build --load \ | |
--build-arg HZ_VERSION=${{ github.event.inputs.HZ_VERSION }} \ | |
--build-arg HZ_VARIANT=${{ matrix.variant }} \ | |
--tag hazelcast-ee:test \ | |
hazelcast-enterprise | |
- name: Run smoke test against EE image | |
timeout-minutes: 2 | |
run: | | |
export HZ_LICENSEKEY=${{ secrets.HZ_ENTERPRISE_LICENSE }} | |
.github/scripts/simple-smoke-test.sh hazelcast-ee:test ${{ env.test_container_name_ee }} | |
- name: Get docker logs | |
if: ${{ always() }} | |
run: | | |
DOCKER_LOG_FILE_EE=docker-hazelcast-ee-test${{ matrix.suffix }}.log | |
echo "DOCKER_LOG_FILE_EE=${DOCKER_LOG_FILE_EE}" >> $GITHUB_ENV | |
docker logs ${{ env.test_container_name_ee }} > ${DOCKER_LOG_FILE_EE} | |
- name: Store docker logs as artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docker-logs | |
path: | | |
${{ env.DOCKER_LOG_FILE_EE }} | |
- name: Login to Docker Hub | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
- name: Build/Push EE image | |
run: | | |
TAGS="--tag ${{ env.DOCKER_ORG }}/hazelcast-enterprise:${{ github.event.inputs.HZ_VERSION }}${{ matrix.suffix }}" | |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
TAGS="${TAGS} --tag ${{ env.DOCKER_ORG }}/hazelcast-enterprise:latest-snapshot${{ matrix.suffix }}" | |
fi | |
docker buildx build --push \ | |
--build-arg HZ_VERSION=${{ github.event.inputs.HZ_VERSION }} \ | |
--build-arg HZ_VARIANT=${{ matrix.variant }} \ | |
--label hazelcast.ee.revision=${{ github.event.inputs.HZ_EE_REVISION }} \ | |
$TAGS \ | |
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x hazelcast-enterprise |