Skip to content

Commit

Permalink
Build NLC images for arm64 [4.2.z] (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldziedziul committed Aug 30, 2023
1 parent df614bc commit edcdf99
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/ee-nlc-snapshot-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
S3_NLC_URL: ${{ secrets.S3_NLC_URL }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -46,18 +46,26 @@ jobs:
- name: Login to Docker Hub
run: echo "${NLC_REPO_TOKEN}" | docker login -u ${NLC_REPO_USERNAME} ${NLC_REPOSITORY} --password-stdin

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
with:
version: v0.5.1

- name: Build EE image
run: |
docker build \
docker buildx build --load \
--build-arg HZ_VERSION=${HZ_VERSION} \
--label hazelcast.ee.revision=${{ github.event.inputs.HZ_EE_REVISION }} \
--tag ${NLC_IMAGE_NAME}:${HZ_VERSION} hazelcast-enterprise
--tag hazelcast-nlc:test hazelcast-enterprise
- name: Run smoke test against EE image
timeout-minutes: 2
run: |
export HZ_INSTANCETRACKING_FILENAME=instance-tracking.txt
.github/scripts/simple-smoke-test.sh ${NLC_IMAGE_NAME}:${HZ_VERSION} ${{ env.test_container_name_ee }}
.github/scripts/simple-smoke-test.sh hazelcast-nlc:test ${{ env.test_container_name_ee }}
- name: Get docker logs
if: ${{ always() }}
Expand All @@ -74,5 +82,10 @@ jobs:
path: |
${{ env.DOCKER_LOG_FILE_EE }}
- name: Push EE image
run: docker push ${NLC_IMAGE_NAME}:${HZ_VERSION}
- name: Build/Push EE image
run: |
docker buildx build --push \
--build-arg HZ_VERSION=${HZ_VERSION} \
--label hazelcast.ee.revision=${{ github.event.inputs.HZ_EE_REVISION }} \
--tag ${NLC_IMAGE_NAME}:${HZ_VERSION} \
--platform=linux/arm64,linux/amd64 hazelcast-enterprise
26 changes: 19 additions & 7 deletions .github/workflows/ee-nlc-tag-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
S3_NLC_URL: ${{ secrets.S3_NLC_URL }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
Expand All @@ -35,7 +35,7 @@ jobs:
echo "S3_NLC_ZIP_URL=${S3_NLC_ZIP_URL}" >> $GITHUB_ENV
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -51,17 +51,25 @@ jobs:
- name: Login to Docker Hub
run: echo "${NLC_REPO_TOKEN}" | docker login -u ${NLC_REPO_USERNAME} ${NLC_REPOSITORY} --password-stdin

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]
with:
version: v0.5.1

- name: Build EE image
run: |
docker build \
docker buildx build --load \
--build-arg HZ_VERSION=${RELEASE_VERSION} \
--tag ${NLC_IMAGE_NAME}:${RELEASE_VERSION} hazelcast-enterprise
--tag hazelcast-nlc:test hazelcast-enterprise
- name: Run smoke test against EE image
timeout-minutes: 2
run: |
export HZ_INSTANCETRACKING_FILENAME=instance-tracking.txt
.github/scripts/simple-smoke-test.sh ${NLC_IMAGE_NAME}:${RELEASE_VERSION} ${{ env.test_container_name_ee }}
.github/scripts/simple-smoke-test.sh hazelcast-nlc:test ${{ env.test_container_name_ee }}
- name: Get docker logs
if: ${{ always() }}
Expand All @@ -78,5 +86,9 @@ jobs:
path: |
${{ env.DOCKER_LOG_FILE_EE }}
- name: Push EE image
run: docker push ${NLC_IMAGE_NAME}:${RELEASE_VERSION}
- name: Build/Push EE image
run: |
docker buildx build --push \
--build-arg HZ_VERSION=${RELEASE_VERSION} \
--tag ${NLC_IMAGE_NAME}:${RELEASE_VERSION} \
--platform=linux/arm64,linux/amd64 hazelcast-enterprise

0 comments on commit edcdf99

Please sign in to comment.