forked from screwdriver-cd/sd-local
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrewdriver.yaml
34 lines (32 loc) · 1.21 KB
/
screwdriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
shared:
image: golang:1.13.6
environment:
GOPATH: /sd/workspace
jobs:
test:
requires: [~pr, ~commit]
steps:
- gover: go version
- tidy: |
go mod tidy
echo 'This step failed because there is an unused module in the go.mod file.'
echo 'Retry again after using the "go mod tidy" command.'
git diff --exit-code --quiet HEAD ./go.mod ./go.sum
- install: go mod download
- gofmt: (! gofmt -d -s . | grep '^')
- install-golint: go get golang.org/x/lint/golint
- test: make test COVERPROFILE=${SD_ARTIFACTS_DIR}/coverage.out
- build: go build -a -o /dev/null
- test-release: "curl -sL https://git.io/goreleaser | bash -s -- --snapshot"
publish:
requires: [test]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- get: go mod download
- tag: ./ci/git-tag.sh
- release: "curl -sL https://git.io/goreleaser | bash"
secrets:
# Pushing tags to Git
- GIT_KEY
# Pushing releases to GitHub
- GITHUB_TOKEN