-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathconfig.yml
160 lines (148 loc) · 4.14 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: 2.1
orbs:
slack: circleci/[email protected]
executors:
golang-executor:
docker:
- image: gcr.io/gcr-for-testing/golang:1.22.12
machine-executor:
machine:
image: ubuntu-2204:current
docker_layer_caching: true
aliases:
- ¬ify_slack_on_fail
slack/notify:
channel: 'C056RL4BXG9' #status-go channel
event: fail
template: basic_fail_1
parameters:
goImage:
type: string
default: "gcr.io/gcr-for-testing/golang:1.22.6"
arangodbImage:
type: string
default: "gcr.io/gcr-for-testing/arangodb/enterprise-preview:devel-nightly"
alpineImage:
type: string
default: "gcr.io/gcr-for-testing/alpine:3.17"
starterImage:
type: string
default: "arangodb/arangodb-starter:latest"
jobs:
check-code:
executor: golang-executor
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run: make tools
- run: make linter
run-unit-tests:
executor: machine-executor
steps:
- checkout
- run: make run-unit-tests
environment:
GOIMAGE: << pipeline.parameters.goImage >>
run-integration-tests:
executor: machine-executor
parameters:
test-to-run:
type: string
default: "run-tests-single"
enable-extra-db-features:
type: boolean
default: false
steps:
- checkout
- run:
name: make << parameters.test-to-run >>
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make << parameters.test-to-run >>
environment:
TEST_RESOURCES: "${HOME}/resources/"
ARANGODB: << pipeline.parameters.arangodbImage >>
GOIMAGE: << pipeline.parameters.goImage >>
ALPINE_IMAGE: << pipeline.parameters.alpineImage >>
STARTER: << pipeline.parameters.starterImage >>
ENABLE_DATABASE_EXTRA_FEATURES: << parameters.enable-extra-db-features >>
TEST_DISALLOW_UNKNOWN_FIELDS: false
VERBOSE: 1
download-demo-data:
executor: machine-executor
steps:
- run: mkdir -p $HOME/resources
- run:
name: Download itzpapalotl demo foxx service
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
if ! [ -f "$HOME/resources/itzpapalotl-v1.2.0.zip" ]; then
curl -L0 -o $HOME/resources/itzpapalotl-v1.2.0.zip "https://github.com/arangodb-foxx/demo-itzpapalotl/archive/v1.2.0.zip"
fi
vulncheck:
executor: golang-executor
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run: make tools
- run: make vulncheck
- *notify_slack_on_fail
workflows:
version: 2
# Default workflow
run_tests:
jobs:
- check-code
- run-unit-tests:
requires:
- check-code
- download-demo-data:
requires:
- run-unit-tests
- run-integration-tests:
name: Test V1 cluster
requires:
- download-demo-data
test-to-run: run-tests-cluster
- run-integration-tests:
name: Test V2 cluster
requires:
- download-demo-data
test-to-run: run-v2-tests-cluster
- run-integration-tests:
name: Test V2 cluster - DB extra features (compression)
requires:
- download-demo-data
test-to-run: run-v2-tests-cluster
enable-extra-db-features: true
- run-integration-tests:
name: Test V1 single
requires:
- download-demo-data
test-to-run: run-tests-single
- run-integration-tests:
name: Test V2 single
requires:
- download-demo-data
test-to-run: run-v2-tests-single
# Weekly vulnerability check
weekly_vulncheck:
jobs:
- vulncheck:
context:
- slack
triggers:
- schedule:
# 6:00 on every Monday
cron: 0 6 * * 1
filters:
branches:
only: master