|
1 | 1 | steps: |
2 | | -- name: docker-build |
3 | | - dockerBuild: |
| 2 | +- name: docker-build-amd64 |
| 3 | + runtimeProfile: amd64 |
| 4 | + when: |
| 5 | + event: ["commit", "tag"] |
| 6 | + containerBuild: |
4 | 7 | user: iceci |
5 | 8 | imageName: utils |
6 | 9 | dockerSecret: dockerhub |
7 | 10 | contextPath: utils |
8 | 11 | dockerfilePath: utils/Dockerfile |
9 | 12 | tags: |
10 | | - - "3" |
11 | | - - latest |
| 13 | + - "{{ ICE_GIT_TAG_OR_BRANCH }}-amd64" |
| 14 | + - "latest-amd64" |
| 15 | + buildArgs: |
| 16 | + - name: BIN_ARCH |
| 17 | + value: amd64 |
| 18 | + |
| 19 | + |
| 20 | +- name: docker-build-arm |
| 21 | + runtimeProfile: arm |
| 22 | + when: |
| 23 | + event: ["commit", "tag"] |
| 24 | + containerBuild: |
| 25 | + user: iceci |
| 26 | + imageName: utils |
| 27 | + dockerSecret: dockerhub |
| 28 | + contextPath: utils |
| 29 | + dockerfilePath: utils/Dockerfile |
| 30 | + tags: |
| 31 | + - "{{ ICE_GIT_TAG_OR_BRANCH }}-arm" |
| 32 | + - "latest-arm" |
| 33 | + buildArgs: |
| 34 | + - name: BIN_ARCH |
| 35 | + value: armv7 |
| 36 | + |
| 37 | + |
| 38 | +- name: docker-build-arm64 |
| 39 | + runtimeProfile: arm64 |
| 40 | + when: |
| 41 | + event: ["commit", "tag"] |
| 42 | + containerBuild: |
| 43 | + user: iceci |
| 44 | + imageName: utils |
| 45 | + dockerSecret: dockerhub |
| 46 | + contextPath: utils |
| 47 | + dockerfilePath: utils/Dockerfile |
| 48 | + tags: |
| 49 | + - "{{ ICE_GIT_TAG_OR_BRANCH }}-arm64" |
| 50 | + - "latest-arm64" |
| 51 | + buildArgs: |
| 52 | + - name: BIN_ARCH |
| 53 | + value: arm64 |
| 54 | + |
| 55 | + |
| 56 | +- name: manifest-push |
| 57 | + when: |
| 58 | + event: ["commit", "tag"] |
| 59 | + containerRun: |
| 60 | + image: iceci/utils |
| 61 | + script: | |
| 62 | + echo "pushing manifest for tag/branch ${ICE_GIT_TAG_OR_BRANCH}" |
| 63 | + manifest-tool push from-args \ |
| 64 | + --platforms linux/amd64,linux/arm,linux/arm64 \ |
| 65 | + --template "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}-ARCH" \ |
| 66 | + --target "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}" |
| 67 | +
|
| 68 | + echo "pushing manifest for tag latest" |
| 69 | + manifest-tool push from-args \ |
| 70 | + --platforms linux/amd64,linux/arm,linux/arm64 \ |
| 71 | + --template "iceci/utils:latest-ARCH" \ |
| 72 | + --target "iceci/utils:latest" |
| 73 | + files: |
| 74 | + - path: /root/.docker/config.json |
| 75 | + fromSecret: docker-config |
0 commit comments