generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from hmcts/RDCC-4745
Ref data - LRD load Add multi arch image configuration
- Loading branch information
Showing
2 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: 1.0-preview-1 | ||
steps: | ||
- id: pull-base-image-amd64 | ||
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/amd64:17-distroless | ||
when: ["-"] | ||
keep: true | ||
|
||
- id: runtime-amd64 | ||
build: > | ||
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64 | ||
--build-arg PLATFORM=/linux/amd64 | ||
--platform linux/amd64 | ||
. | ||
when: | ||
- pull-base-image-amd64 | ||
keep: true | ||
|
||
- id: pull-base-image-arm64 | ||
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/arm64:17-distroless | ||
when: | ||
- pull-base-image-amd64 | ||
keep: true | ||
|
||
- id: runtime-arm64 | ||
build: > | ||
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64 | ||
--build-arg PLATFORM=/linux/arm64 | ||
--platform linux/arm64/v8 | ||
. | ||
when: | ||
- pull-base-image-arm64 | ||
keep: true | ||
|
||
- id: push-images | ||
push: | ||
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64" | ||
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64" | ||
when: | ||
- runtime-amd64 | ||
- runtime-arm64 | ||
|
||
- id: manifest-create | ||
cmd: docker manifest create {{.Run.Registry}}/{{CI_IMAGE_TAG}} {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64 {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64 | ||
when: | ||
- push-images | ||
keep: true | ||
|
||
- id: manifest-push | ||
cmd: docker manifest push --purge {{.Run.Registry}}/{{CI_IMAGE_TAG}} | ||
when: | ||
- manifest-create | ||
keep: true |