Skip to content

Commit 5693e90

Browse files
authored
Share download-hz-dist action between hazelcast-docker and hazelcast-packaging (#1127)
See hazelcast/docker-actions#22
1 parent 95b1fdd commit 5693e90

File tree

1 file changed

+11
-36
lines changed

1 file changed

+11
-36
lines changed

.github/workflows/tag_image_push.yml

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ jobs:
116116
entries=()
117117
118118
if [ "${{ steps.resolve-editions.outputs.should_build_oss }}" = "yes" ]; then
119-
entries+=('{"label":"oss","docker-dir":"source_path/hazelcast-oss","image-name":"${{ vars.DOCKERHUB_OSS_IMAGE_NAME }}","artifact-id":"hazelcast-distribution"}')
119+
entries+=('{"label":"oss","docker-dir":"source_path/hazelcast-oss","image-name":"${{ vars.DOCKERHUB_OSS_IMAGE_NAME }}","distribution":"hazelcast"}')
120120
fi
121121
if [ "${{ steps.resolve-editions.outputs.should_build_ee }}" = "yes" ]; then
122-
entries+=('{"label":"ee","docker-dir":"source_path/hazelcast-enterprise","image-name":"${{ vars.DOCKERHUB_EE_IMAGE_NAME }}","artifact-id":"hazelcast-enterprise-distribution"}')
122+
entries+=('{"label":"ee","docker-dir":"source_path/hazelcast-enterprise","image-name":"${{ vars.DOCKERHUB_EE_IMAGE_NAME }}","distribution":"hazelcast-enterprise"}')
123123
fi
124124
125125
json="[$(IFS=,; echo "${entries[*]}")]"
@@ -174,40 +174,15 @@ jobs:
174174
"password": "${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}"
175175
}]
176176
177-
- name: Get dist ZIP
178-
run: |
179-
case "${{ matrix.distribution-type.label }}" in
180-
"oss")
181-
if [[ "${HZ_VERSION}" =~ SNAPSHOT ]]; then
182-
repo="${{ vars.MAVEN_OSS_SNAPSHOT_REPO }}"
183-
else
184-
repo="${{ vars.MAVEN_OSS_RELEASE_REPO }}"
185-
fi
186-
;;
187-
"ee")
188-
if [[ "${HZ_VERSION}" =~ SNAPSHOT ]]; then
189-
repo="${{ vars.MAVEN_EE_SNAPSHOT_REPO }}"
190-
else
191-
repo="${{ vars.MAVEN_EE_RELEASE_REPO }}"
192-
fi
193-
;;
194-
*)
195-
echoerr "Unsupported repository behaviour for ${{ matrix.distribution-type.label }}" ; return 1
196-
;;
197-
esac
198-
199-
mvn \
200-
dependency:2.10:get \
201-
-DremoteRepositories="${repo}" \
202-
-DgroupId="com.hazelcast" \
203-
-DartifactId="${{ matrix.distribution-type.artifact-id }}" \
204-
-Dversion="${HZ_VERSION}" \
205-
-Dclassifier="${{ matrix.variant.classifier }}" \
206-
-Dpackaging=zip \
207-
-Dtransitive=false \
208-
-Ddest="${{ matrix.distribution-type.docker-dir }}/${{ matrix.distribution-type.artifact-id }}.zip" \
209-
--batch-mode \
210-
--no-transfer-progress
177+
- name: Download the distribution file
178+
uses: hazelcast/docker-actions/download-hz-dist@master
179+
with:
180+
repo-vars-as-json: ${{ toJSON(vars) }}
181+
distribution: ${{ matrix.distribution-type.distribution }}
182+
hz_version: ${{ env.HZ_VERSION }}
183+
classifier: ${{ matrix.variant.classifier }}
184+
packaging: "zip"
185+
output_file: "${{ matrix.distribution-type.docker-dir }}/${{ matrix.distribution-type.distribution }}-distribution.zip"
211186

212187
- name: Check if latest EE LTS release
213188
if: matrix.distribution-type.label == 'ee'

0 commit comments

Comments
 (0)