-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathairflow-2.10.3-r0.yaml
152 lines (101 loc) · 3.59 KB
/
airflow-2.10.3-r0.yaml
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
package:
name: airflow-2.10.3-r0
version: 2.10.3
epoch: 0
description: Platform to programmatically author, schedule, and monitor workflows
options:
no-depends: true
dependencies:
runtime:
- python-3.12
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- gcc
- glibc-dev
- mariadb-connector-c-dev
- mariadb-dev
- nodejs
- openssf-compiler-options
- pkgconf-dev
- postgresql-dev
- py3.12-pip
- py3-xmlsec
- python-3.12
- python-3.12-dev
- wolfi-base
- xmlsec-dev
- xmlsec-openssl
- yarn
pipeline:
- uses: git-checkout
with:
repository: https://github.com/apache/airflow
tag: ${{package.version}}
expected-commit: c99887ec11ce3e1a43f2794fcf36d27555140f00
- runs: "# by default airflow celery provider is not built,but running the upstream helm chart requires it\n python patch.py\n # remove the patcher\n rm -rf patch.py\n"
- uses: patch
with:
patches: requests.patch urllib3.patch
- runs: '# requires EPOCH to be later that 1980
export SOURCE_DATE_EPOCH=315532800
python -m venv venv --system-site-packages
source venv/bin/activate
pip install build
# To install mysqlclient wheel
export MYSQLCLIENT_CFLAGS=`mysql_config --cflags`
export MYSQLCLIENT_LDFLAGS=`mysql_config --libs`
python -m build --wheel
pip install dist/*.whl
'
- runs: '# CVE-2024-6345 GHSA-cx63-2mw6-8hw5
# setuptools comes from airflow/providers/google/provider.yaml having
# gcloud-aio-auth>=4.0.0,<5.0.0 . gcloud-aio-auth 4 is backlevel and has
# setuptools in it''s pyproject.toml ''tool.poetry.dependencies''
# The tldr; For that case it is not needed in runtime.
./venv/bin/pip uninstall --yes setuptools
'
- working-directory: venv/lib/python3.12/site-packages/airflow/www
runs: '# front-end build
yarn install --frozen-lockfile
yarn run build
rm -rf node_modules
'
- runs: find . -name '__pycache__' -exec rm -rf {} +
- runs: 'mkdir -p ${{targets.destdir}}/opt/airflow/dags
mkdir -p ${{targets.destdir}}/scripts/docker
# The first time you run Airflow, it will create a file called `airflow.cfg` in
# `$AIRFLOW_HOME` directory
# However, for production case it is advised to generate the configuration
venv/bin/airflow config list --defaults > ${{targets.destdir}}/"airflow.cfg"
mv venv ${{targets.destdir}}/opt/airflow
rm -rf ${{targets.destdir}}/opt/airflow/venv/bin/__pycache*
sed -i "s|/home/build|/opt/airflow|g" ${{targets.destdir}}/opt/airflow/venv/bin/*
cp airflow/config_templates/default_webserver_config.py ${{targets.destdir}}/
cp scripts/docker/entrypoint_prod.sh ${{targets.destdir}}/entrypoint
chmod 755 ${{targets.destdir}}/entrypoint
cp scripts/docker/clean-logs.sh ${{targets.destdir}}/clean-logs
chmod 755 ${{targets.destdir}}/clean-logs
cp scripts/docker/airflow-scheduler-autorestart.sh ${{targets.destdir}}/airflow-scheduler-autorestart
chmod 755 ${{targets.destdir}}/airflow-scheduler-autorestart
cp -r scripts/docker/* ${{targets.destdir}}/scripts/docker
chmod 755 ${{targets.destdir}}/scripts/docker
'
update:
enabled: true
ignore-regex-patterns:
- rc\d+$
- helm-chart*
github:
identifier: apache/airflow
test:
environment:
contents:
packages:
- python3
pipeline:
- runs: 'export PATH=/opt/airflow/venv/bin:$PATH
HOME=/home/build airflow version
'