-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathconfig.yml
More file actions
298 lines (274 loc) · 8.56 KB
/
Copy pathconfig.yml
File metadata and controls
298 lines (274 loc) · 8.56 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# Warning: automatically generated file
# Please edit config.yml.j2, and use the script generate_circleci_config.py
---
version: 2.1
workflows:
version: 2
install-airflow-chart:
jobs:
- lint
- run_pre_commit
- unittest-charts
- approve-test-all:
type: approval
- build-and-release-internal:
context:
- gcp-astronomer-prod
requires:
- lint
- run_pre_commit
- unittest-charts
- airflow-test:
name: test-1-31-14-CeleryExecutor
kube_version: 1.31.14
executor: CeleryExecutor
requires:
- build-and-release-internal
- airflow-test:
name: test-1-31-14-LocalExecutor
kube_version: 1.31.14
executor: LocalExecutor
requires:
- build-and-release-internal
- airflow-test:
name: test-1-31-14-KubernetesExecutor
kube_version: 1.31.14
executor: KubernetesExecutor
requires:
- build-and-release-internal
- airflow-test:
name: test-1-32-11-CeleryExecutor
kube_version: 1.32.11
executor: CeleryExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-32-11-LocalExecutor
kube_version: 1.32.11
executor: LocalExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-32-11-KubernetesExecutor
kube_version: 1.32.11
executor: KubernetesExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-33-7-CeleryExecutor
kube_version: 1.33.7
executor: CeleryExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-33-7-LocalExecutor
kube_version: 1.33.7
executor: LocalExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-33-7-KubernetesExecutor
kube_version: 1.33.7
executor: KubernetesExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-34-3-CeleryExecutor
kube_version: 1.34.3
executor: CeleryExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-34-3-LocalExecutor
kube_version: 1.34.3
executor: LocalExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-34-3-KubernetesExecutor
kube_version: 1.34.3
executor: KubernetesExecutor
requires:
- build-and-release-internal
- approve-test-all
- airflow-test:
name: test-1-35-0-CeleryExecutor
kube_version: 1.35.0
executor: CeleryExecutor
requires:
- build-and-release-internal
- airflow-test:
name: test-1-35-0-LocalExecutor
kube_version: 1.35.0
executor: LocalExecutor
requires:
- build-and-release-internal
- airflow-test:
name: test-1-35-0-KubernetesExecutor
kube_version: 1.35.0
executor: KubernetesExecutor
requires:
- build-and-release-internal
- approve-release-prod:
type: approval
filters:
branches:
only:
- '/^release-\d+\.\d+$/'
- release-public:
context:
- github-repo
- gcp-astronomer-prod
requires:
- approve-release-prod
- "test-1-31-14-CeleryExecutor"
- "test-1-31-14-LocalExecutor"
- "test-1-31-14-KubernetesExecutor"
- "test-1-32-11-CeleryExecutor"
- "test-1-32-11-LocalExecutor"
- "test-1-32-11-KubernetesExecutor"
- "test-1-33-7-CeleryExecutor"
- "test-1-33-7-LocalExecutor"
- "test-1-33-7-KubernetesExecutor"
- "test-1-34-3-CeleryExecutor"
- "test-1-34-3-LocalExecutor"
- "test-1-34-3-KubernetesExecutor"
- "test-1-35-0-CeleryExecutor"
- "test-1-35-0-LocalExecutor"
- "test-1-35-0-KubernetesExecutor"
filters:
branches:
only:
- '/^release-\d+\.\d+$/'
jobs:
run_pre_commit:
resource_class: small
docker:
- image: quay.io/astronomer/ci-pre-commit:2026-08
steps:
- checkout
- run:
name: "Create pre-commit-cache-key.txt"
command: |
cp .pre-commit-config.yaml /tmp/pre-commit-cache-key.txt
python --version --version | sed 's/^/# /' >> /tmp/pre-commit-cache-key.txt
- restore_cache:
keys:
- pre-commit-cache-{{ checksum "/tmp/pre-commit-cache-key.txt" }}
- run:
name: Install pre-commit hooks
command: pre-commit install-hooks
- save_cache:
key: pre-commit-cache-{{ checksum "/tmp/pre-commit-cache-key.txt" }}
paths:
- ~/.cache/pre-commit
- run:
name: Run pre-commit
command: pre-commit run --all-files --show-diff-on-failure
environment:
SKIP: no-commit-to-branch
lint:
docker:
- image: alpine/helm:3.19.0
steps:
- checkout
- run:
name: Lint the Airflow chart
command: bin/lint
unittest-charts:
docker:
- image: quay.io/astronomer/ci-helm-release:2026-08
parallelism: 8
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run:
name: unittest the Airflow chart
command: |
mkdir test-results
make venv
make charts
TEST_FILES=$(circleci tests glob "tests/chart/test_*.py" | circleci tests split --split-by=timings)
.venv/bin/python -m pytest -n auto -v --junitxml=test-results/junit.xml $TEST_FILES
- store_test_results:
path: test-results
build-and-release-internal:
docker:
- image: quay.io/astronomer/ci-helm-release:2026-08
steps:
- checkout
- run:
name: Package and release to internal
command: bin/package-and-release-internal
- persist_to_workspace:
root: /tmp/airflow-chart-package
paths:
- "./*.tgz"
airflow-test:
machine:
# https://circleci.com/developer/machine/image/ubuntu-2204
image: ubuntu-2204:2025.09.1
# https://circleci.com/docs/reference/configuration-reference/#docker-execution-environment
resource_class: large
parameters:
executor:
type: string
default: "LocalExecutor"
kube_version:
type: string
default: "1.35.0"
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- run:
name: Install Airflow chart
command: |
export KUBE_VERSION=<< parameters.kube_version >>
export EXECUTOR=<< parameters.executor >>
HELM_CHART_PATH=$(find /tmp/workspace/ -name 'airflow-*.tgz')
export HELM_CHART_PATH
bin/install-ci-tools
bin/run-ci
- store_test_results:
path: test-results
release-internal:
docker:
- image: quay.io/astronomer/ci-helm-release:2026-08
steps:
- checkout
- run:
name: Release the Airflow chart to internal
command: bin/package-and-release-internal
release-public:
docker:
- image: quay.io/astronomer/ci-helm-release:2026-08
steps:
- checkout
- publish-github-release
- run:
name: "Copy internal chart to prod repo"
command: bin/release-internal-to-prod
commands:
publish-github-release:
description: "Create a release on GitHub"
parameters:
tag:
type: string
default: "$NEXT_TAG"
steps:
- run:
name: Create a release on GitHub
command: |
set -xe
# We can remove --debug after we are happy with it
astronomer-ci --debug publish-github-release --github-repository "$CIRCLE_PROJECT_REPONAME" --github-organization "$CIRCLE_PROJECT_USERNAME" --commitish "$CIRCLE_SHA1"