generated from alexfalkowski/go-service-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
116 lines (113 loc) · 3.16 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: 2.1
orbs:
codecov: codecov/codecov@4.0.1
jobs:
build-client:
docker:
- image: alexfalkowski/go:1.3
working_directory: ~/go-client-template
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- restore_cache:
name: restore go deps
keys:
- go-client-template-go-cache-{{ checksum "go.sum" }}
- go-client-template-go-cache-
- restore_cache:
name: restore ruby deps
keys:
- go-client-template-ruby-cache-{{ checksum "test/Gemfile.lock" }}
- go-client-template-ruby-cache-
- run: make dep
- save_cache:
name: save go deps
key: go-client-template-go-cache-{{ checksum "go.sum" }}
paths:
- /home/circleci/go/pkg/mod
- save_cache:
name: save ruby deps
key: go-client-template-ruby-cache-{{ checksum "test/Gemfile.lock" }}
paths:
- test/vendor
- restore_cache:
name: restore go build cache
keys:
- go-client-template-go-build-cache-{{ checksum "go.sum" }}
- go-client-template-go-build-cache-
- run: make lint
- run: make sec
- run: make features
- run: make build analyse
- save_cache:
name: save go build cache
key: go-client-template-go-build-cache-{{ checksum "go.sum" }}
paths:
- /home/circleci/.cache/go-build
- run: make coverage
- store_test_results:
path: test/reports
- store_artifacts:
path: test/reports
- run: make codecov-upload
resource_class: large
build-docker:
docker:
- image: alexfalkowski/go:1.3
working_directory: ~/go-client-template
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- setup_remote_docker:
docker_layer_caching: true
- run: make build-docker
- run: make trivy
resource_class: large
release:
docker:
- image: alexfalkowski/release:3.4
working_directory: ~/go-client-template
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run: release
resource_class: large
push-docker:
docker:
- image: alexfalkowski/go:1.3
working_directory: ~/go-client-template
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- setup_remote_docker:
docker_layer_caching: true
- run:
name: make login
command: echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
- run: make push-docker
resource_class: large
workflows:
go-client-template:
jobs:
- build-client
- build-docker:
context: gh
- release:
context: gh
requires:
- build-client
- build-docker
filters:
branches:
only: master
- push-docker:
context: docker
requires:
- release
filters:
branches:
only: master