mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Build multi-arch image.
This will build only those architectures that we have runners to build on
This commit is contained in:
parent
9175e86321
commit
5ee90a78b4
1 changed files with 41 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
stages:
|
||||
- test
|
||||
- deploy
|
||||
- container-build
|
||||
|
||||
variables:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
@ -275,14 +279,45 @@ release-job:
|
|||
url: '${CI_PROJECT_URL}/-/jobs/${TAR_JOB_ID}/artifacts/file/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz'
|
||||
|
||||
build-container:
|
||||
stage: deploy
|
||||
variables:
|
||||
TAG: latest
|
||||
stage: container-build
|
||||
parallel:
|
||||
matrix:
|
||||
- ARCH: amd64
|
||||
- ARCH: arm64
|
||||
- ARCH: s390x
|
||||
tags:
|
||||
- $ARCH
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.14.0-debug
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- /kaniko/executor
|
||||
- if [ -n "$CI_COMMIT_TAG" ]; then TAG="$CI_COMMIT_TAG"; fi
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context "${CI_PROJECT_DIR}"
|
||||
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
||||
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
--destination "${CI_REGISTRY_IMAGE}:${TAG}_${ARCH}"
|
||||
|
||||
merge-manifests:
|
||||
variables:
|
||||
TAG: latest
|
||||
stage: container-build
|
||||
needs:
|
||||
- job: build-container
|
||||
artifacts: false
|
||||
image:
|
||||
name: mplatform/manifest-tool:alpine
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- if [ -n "$CI_COMMIT_TAG" ]; then export TAG="$CI_COMMIT_TAG"; fi
|
||||
- >-
|
||||
manifest-tool
|
||||
--username="${CI_REGISTRY_USER}"
|
||||
--password="${CI_REGISTRY_PASSWORD}"
|
||||
push from-args
|
||||
--platforms linux/amd64,linux/arm64,linux/s390x
|
||||
--template "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}_ARCH"
|
||||
--target "${CI_REGISTRY_IMAGE}:${TAG}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue