-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathconfig.yml
136 lines (133 loc) · 4.17 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#Copyright 2017 FairwindsOps Inc.
#
#Licensed under the Apache License, Version 2.0 (the “License”);
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an “AS IS” BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
version: 2.1
orbs:
rok8s: fairwinds/rok8s-scripts@11
oss-docs: fairwinds/oss-docs@0
references:
e2e_configuration: &e2e_configuration
attach-workspace: true
workspace-location: /
pre_script: end_to_end_testing/pre_go.sh
script: end_to_end_testing/run_go.sh
command_runner_image: quay.io/reactiveops/ci-images:v11-buster
enable_docker_layer_caching: false
store-test-results: /tmp/test-results
requires:
- test
- snapshot
filters:
branches:
only: /.*/
tags:
ignore: /.*/
install_vault_alpine: &install_vault_alpine
run:
name: install hashicorp vault
command: |
apk --update add curl yq
cd /tmp
curl -LO https://releases.hashicorp.com/vault/1.9.4/vault_1.9.4_linux_amd64.zip
unzip vault_1.9.4_linux_amd64.zip
mv vault /usr/bin/vault
jobs:
test:
working_directory: /home/circleci/go/src/github.com/fairwindsops/reckoner
docker:
- image: cimg/go:1.18
steps:
- checkout
- run: make test
snapshot:
working_directory: /go/src/github.com/fairwindsops/reckoner
docker:
- image: goreleaser/goreleaser:v1.10.3
steps:
- checkout
- setup_remote_docker
- run:
name: Goreleaser Snapshot
command: goreleaser --snapshot --skip-sign -p 1
- store_artifacts:
path: dist
destination: snapshot
- persist_to_workspace:
root: /go/src/github.com/fairwindsops/reckoner
paths:
- dist
release:
working_directory: /home/circleci/go/src/github.com/fairwindsops/reckoner
resource_class: large
shell: /bin/bash
docker:
- image: goreleaser/goreleaser:v1.10.3
steps:
- checkout
- setup_remote_docker
- *install_vault_alpine
- rok8s/get_vault_env:
vault_path: repo/global/env
- rok8s/get_vault_env:
vault_path: repo/reckoner/env
- run:
name: docker login
command: |
docker login -u _json_key -p "$(echo $GCP_ARTIFACTREADWRITE_JSON_KEY | base64 -d)" us-docker.pkg.dev
- run: echo 'export GORELEASER_CURRENT_TAG="${CIRCLE_TAG}"' >> $BASH_ENV
- run: goreleaser -p 1
workflows:
version: 2
build_and_test:
jobs:
- test:
filters:
tags:
ignore: /.*/
branches:
only: /.*/
- snapshot:
requires:
- test
filters:
tags:
ignore: /.*/
branches:
only: /.*/
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.20.2"
kind_node_image: "kindest/node:v1.20.2@sha256:15d3b5c4f521a84896ed1ead1b14e4774d02202d5c65ab68f30eeaf310a3b1a7"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.21.1"
kind_node_image: "kindest/node:v1.21.2@sha256:9d07ff05e4afefbba983fac311807b3c17a5f36e7061f6cb7e2ba756255b2be4"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.22.0"
kind_node_image: "kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047"
<<: *e2e_configuration
release:
jobs:
- oss-docs/publish-docs:
repository: reckoner
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/