godns/.gitlab-ci.yml

87 lines
2.2 KiB
YAML

stages:
- build
- build-docker
- manifest
build-windows-amd64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOOS=windows go build -o godns.exe
artifacts:
paths:
- godns.exe
build-linux-amd64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOOS=linux go build -o godns
artifacts:
paths:
- godns
build-linux-arm:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOARCH=arm GOOS=linux go build -o godns-arm
artifacts:
paths:
- godns-arm
build-linux-arm64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOARCH=arm64 GOOS=linux go build -o godns-arm64
artifacts:
paths:
- godns-arm64
build-docker-amd64:
image: docker:latest
stage: build-docker
script:
- apk --no-cache add git
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker image build -t $CI_REGISTRY_IMAGE:amd64-latest -f docker/Dockerfile .
- docker push $CI_REGISTRY_IMAGE:amd64-latest
build-docker-arm:
image: docker:latest
stage: build-docker
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- 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
build-docker-arm64:
image: docker:latest
stage: build-docker
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- 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
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