-
Notifications
You must be signed in to change notification settings - Fork 36
/
config.yml
79 lines (74 loc) · 2.05 KB
/
config.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: 2.1
orbs:
rok8s: fairwinds/rok8s-scripts@11
jobs:
test:
working_directory: /go/src/github.com/fairwindsops/nova
docker:
- image: circleci/golang:1.14
steps:
- checkout
- run:
name: lint
command: |
go get -u golang.org/x/lint/golint
golint -set_exit_status ./... | tee golint-report.out
test -z $(go fmt ./...)
- run:
name: test
command: |
go test -v --bench --benchmem -coverprofile=coverage.txt -covermode=atomic ./pkg/...
go vet 2> govet-report.out
go tool cover -html=coverage.txt -o cover-report.html
- run: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
release-binary:
docker:
- image: circleci/golang:1.13
environment:
GO111MODULE: "on"
steps:
- checkout
- setup_remote_docker
- run: curl -sL http://git.io/goreleaser | bash
workflows:
version: 2
test_and_build:
jobs:
- test
- rok8s/docker_build_and_push:
name: build-container
docker-push: false
password-variable: "fairwinds_quay_token"
enable_docker_layer_caching: true
config_file: .circleci/build.config
requires:
- test
filters:
branches:
only: /pull\/[0-9]+/
- rok8s/docker_build_and_push:
name: build-and-push-container
docker-push: true
enable_docker_layer_caching: true
config_file: .circleci/build.config
context: org-global
docker-login: true
password-variable: "fairwinds_quay_token"
registry: quay.io
username: fairwinds+circleci
requires:
- test
filters:
branches:
only: /master/
tags:
only: /.*/
release:
jobs:
- release-binary:
context: org-global
filters:
branches:
ignore: /.*/
tags:
only: /.*/