This commit is contained in:
Tyler 2018-06-30 23:20:36 -04:00
parent 9856d3f3be
commit ee63c52b7a

View File

@ -16,6 +16,7 @@ build-linux-amd64:
image: golang:alpine image: golang:alpine
stage: build stage: build
script: script:
- apk --no-cache add git
- go get -d - go get -d
- GOOS=linux go build -o godns - GOOS=linux go build -o godns
artifacts: artifacts:
@ -26,6 +27,7 @@ build-linux-arm:
image: golang:alpine image: golang:alpine
stage: build stage: build
script: script:
- apk --no-cache add git
- go get -d - go get -d
- GOARCH=arm GOOS=linux go build -o godns-arm - GOARCH=arm GOOS=linux go build -o godns-arm
artifacts: artifacts:
@ -36,6 +38,7 @@ build-linux-arm64:
image: golang image: golang
stage: build stage: build
script: script:
- apk --no-cache add git
- go get -d - go get -d
- GOARCH=arm64 GOOS=linux go build -o godns-arm64 - GOARCH=arm64 GOOS=linux go build -o godns-arm64
artifacts: artifacts:
@ -46,6 +49,7 @@ build-docker-amd64:
image: docker:latest image: docker:latest
stage: build-docker stage: build-docker
script: script:
- apk --no-cache add git
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - 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 image build -t $CI_REGISTRY_IMAGE:amd64-latest -f docker/Dockerfile .
- docker push $CI_REGISTRY_IMAGE:amd64-latest - docker push $CI_REGISTRY_IMAGE:amd64-latest