diff options
| author | Kumar Damani <me@kumardamani.net> | 2022-06-06 23:04:32 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2022-06-07 02:06:24 +0000 |
| commit | 4445692f75e4e4072cc4940bcb9eff80ae5559f0 (patch) | |
| tree | a4a0be4ce7d2fc057e7697aef4d3707a49bc1fd8 /.gitlab-ci.yml | |
Initial commit
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..09211e8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: docker:latest +services: + - docker:dind + +stages: + - build + +variables: + IMAGE: registry.gitlab.com/kdam0/nccli + DOCKER_CLI_EXPERIMENTAL: enabled + +before_script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + +build: + stage: build + script: + - docker build --build-arg opts="CGO_ENABLED=0 GOARCH=amd64" --pull -t $IMAGE:amd64 . + - docker push $IMAGE:amd64 + - docker build --build-arg opts="GOARCH=arm GOARM=7" --pull -t $IMAGE:arm32v7 . + - docker push $IMAGE:arm32v7 + - docker manifest create $IMAGE $IMAGE:amd64 $IMAGE:arm32v7 + - docker manifest annotate $IMAGE $IMAGE:arm32v7 --os linux --arch arm + - docker manifest push $IMAGE |
