Commit 581390cd authored by Christophe Picard's avatar Christophe Picard
Browse files

Update .gitlab-ci.yml

parent 285c2136
Pipeline #35391 failed with stages
in 28 seconds
image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
PACKAGE_PATH: /go/src/gitlab.com/hypnoglow/example-go-docker-gitlab
before_script:
- apk add --update --no-cache git
stages:
- dep
- test
- build
test:
script:
- hugo
except:
- master
# A hack to make Golang-in-Gitlab happy
.anchors:
- &inject-gopath
mkdir -p $(dirname ${PACKAGE_PATH})
&& ln -s ${CI_PROJECT_DIR} ${PACKAGE_PATH}
&& cd ${PACKAGE_PATH}
pages:
dep:
stage: dep
image: golang:1.10-alpine3.7
before_script:
- apk add --no-cache curl git
- curl -sSL https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o /go/bin/dep
- chmod +x /go/bin/dep
- *inject-gopath
script:
- hugo
- dep ensure -v -vendor-only
artifacts:
name: "vendor-$CI_PIPELINE_ID"
paths:
- public
only:
- master
- vendor/
expire_in: 1 hour
test:
stage: test
dependencies:
- dep
image: golang:1.10-alpine3.7
before_script:
- *inject-gopath
script:
- go test ./...
build:
stage: build
dependencies:
- dep
image: docker:17
services:
- docker:dind
script:
- docker build -t app .
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment