Skip to content

Instantly share code, notes, and snippets.

@max-weis
Created November 6, 2019 16:34
Show Gist options
  • Save max-weis/724e9a9d002ecf53115f48015f45ada0 to your computer and use it in GitHub Desktop.
Save max-weis/724e9a9d002ecf53115f48015f45ada0 to your computer and use it in GitHub Desktop.
stages:
- go-build
- go-test
- container-build-push
build:
stage: go-build
image: golang:1.13
script:
- go build
test:
stage: go-test
image: golang:1.13
script:
- go test ./... -v
container:
stage: container-build-push
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment