2018-07-01 03:09:52 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2018-07-01 03:16:46 +00:00
|
|
|
- build-docker
|
2018-09-01 01:34:14 +00:00
|
|
|
- manifest
|
2018-07-01 03:09:52 +00:00
|
|
|
|
2018-07-01 03:16:46 +00:00
|
|
|
build-windows-amd64:
|
|
|
|
image: golang:alpine
|
2018-07-01 03:18:06 +00:00
|
|
|
stage: build
|
2018-07-01 03:16:46 +00:00
|
|
|
script:
|
2018-07-01 03:21:39 +00:00
|
|
|
- apk --no-cache add git
|
2018-07-01 03:16:46 +00:00
|
|
|
- go get -d
|
|
|
|
- GOOS=windows go build -o godns.exe
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- godns.exe
|
|
|
|
|
|
|
|
build-linux-amd64:
|
|
|
|
image: golang:alpine
|
2018-07-01 03:18:06 +00:00
|
|
|
stage: build
|
2018-07-01 03:16:46 +00:00
|
|
|
script:
|
2018-07-01 03:20:36 +00:00
|
|
|
- apk --no-cache add git
|
2018-07-01 03:16:46 +00:00
|
|
|
- go get -d
|
|
|
|
- GOOS=linux go build -o godns
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- godns
|
|
|
|
|
|
|
|
build-linux-arm:
|
|
|
|
image: golang:alpine
|
2018-07-01 03:18:06 +00:00
|
|
|
stage: build
|
2018-07-01 03:16:46 +00:00
|
|
|
script:
|
2018-07-01 03:20:36 +00:00
|
|
|
- apk --no-cache add git
|
2018-07-01 03:16:46 +00:00
|
|
|
- go get -d
|
|
|
|
- GOARCH=arm GOOS=linux go build -o godns-arm
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- godns-arm
|
|
|
|
|
|
|
|
build-linux-arm64:
|
2018-07-01 03:21:39 +00:00
|
|
|
image: golang:alpine
|
2018-07-01 03:18:06 +00:00
|
|
|
stage: build
|
2018-07-01 03:16:46 +00:00
|
|
|
script:
|
2018-07-01 03:20:36 +00:00
|
|
|
- apk --no-cache add git
|
2018-07-01 03:16:46 +00:00
|
|
|
- go get -d
|
|
|
|
- GOARCH=arm64 GOOS=linux go build -o godns-arm64
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- godns-arm64
|
|
|
|
|
|
|
|
build-docker-amd64:
|
2018-07-01 03:09:52 +00:00
|
|
|
image: docker:latest
|
2018-07-01 03:16:46 +00:00
|
|
|
stage: build-docker
|
2018-07-01 03:09:52 +00:00
|
|
|
script:
|
2018-07-01 03:20:36 +00:00
|
|
|
- apk --no-cache add git
|
2018-07-01 03:19:53 +00:00
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2018-07-01 03:09:52 +00:00
|
|
|
- docker image build -t $CI_REGISTRY_IMAGE:amd64-latest -f docker/Dockerfile .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:amd64-latest
|
|
|
|
|
2018-07-01 03:16:46 +00:00
|
|
|
build-docker-arm:
|
2018-07-01 03:09:52 +00:00
|
|
|
image: docker:latest
|
2018-07-01 03:16:46 +00:00
|
|
|
stage: build-docker
|
2018-07-01 03:09:52 +00:00
|
|
|
script:
|
2018-07-01 03:19:53 +00:00
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2018-07-01 03:09:52 +00:00
|
|
|
- mkdir tmp
|
|
|
|
- wget -O tmp/qemu-arm-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-arm-static
|
|
|
|
- chmod +x tmp/qemu-arm-static
|
|
|
|
- docker image build -t $CI_REGISTRY_IMAGE:arm-latest -f docker/Dockerfile.arm .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:arm-latest
|
|
|
|
|
2018-07-01 03:16:46 +00:00
|
|
|
build-docker-arm64:
|
2018-07-01 03:09:52 +00:00
|
|
|
image: docker:latest
|
2018-07-01 03:16:46 +00:00
|
|
|
stage: build-docker
|
2018-07-01 03:09:52 +00:00
|
|
|
script:
|
2018-07-01 03:19:53 +00:00
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2018-07-01 03:09:52 +00:00
|
|
|
- mkdir tmp
|
|
|
|
- wget -O tmp/qemu-aarch64-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-aarch64-static
|
|
|
|
- chmod +x tmp/qemu-aarch64-static
|
|
|
|
- docker image build -t $CI_REGISTRY_IMAGE:arm64-latest -f docker/Dockerfile.arm64 .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:arm64-latest
|
2018-09-01 01:34:14 +00:00
|
|
|
|
|
|
|
manifest:
|
|
|
|
image: registry.git.meow.tf/docker/tools/manifest-tool
|
|
|
|
stage: manifest
|
|
|
|
script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
- manifest-tool push from-spec manifest.yml
|