stages: - status-pre - build - image - status-post .build-base: image: apextoaster/base:1.3 tags: - platform:k8s - runner:shared build-go: extends: - .build-base stage: build image: apextoaster/golang:1.14 script: - time go build - time go test variables: GOPATH: /build artifacts: paths: - home-dns expire_in: 1 hour cache: key: "${CI_COMMIT_REF_SLUG}" policy: pull-push paths: - vendor build-image: extends: - .build-base stage: image image: apextoaster/docker:18.09 services: - apextoaster/docker-dind:18.09 dependencies: - build-go allow_failure: false before_script: - mkdir ${HOME}/.docker - echo "${DOCKER_SECRET}" | base64 -d > ${HOME}/.docker/config.json script: - ${CI_PROJECT_DIR}/scripts/docker-build.sh --push after_script: - rm -rfv ${HOME}/.docker variables: DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://localhost:237 IMAGE_ARCH: ubuntu github-pending: stage: status-pre extends: - .build-base script: - ./scripts/github-status.sh pending github-failure: stage: status-post extends: - .build-base when: on_failure script: - ./scripts/github-status.sh failure github-success: stage: status-post extends: - .build-base when: on_success script: - ./scripts/github-status.sh success