-
Notifications
You must be signed in to change notification settings - Fork 29
/
common.py
44 lines (30 loc) · 1.03 KB
/
common.py
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
"""
Common utility functions for CircleCI configurator scripts
"""
import collections
import os
circle_directory = os.path.dirname(os.path.realpath(__file__))
project_directory = os.path.join(circle_directory, "..")
def dev_releases(all_releases):
"""Find dev releases from a list of releases"""
return [
release for release in all_releases
if is_dev_release(release) and get_airflow_version(release) not in DEV_ALLOWLIST
]
def is_dev_release(version):
return "dev" in version or is_edge_build(version)
def is_edge_build(version):
return "main" in version
def get_airflow_version(ac_version):
"""Get Airflow Version from the string containing AC Version"""
if is_edge_build(ac_version):
return "main"
return ac_version.split('-')[0]
IMAGE_MAP = collections.OrderedDict([
("1.10.15-9-dev", ["buster"]),
("2.1.4-9-dev", ["buster"]),
("2.3.3-1", ["bullseye"]),
("main-dev", ["bullseye"]),
])
# Airflow Versions for which we don't publish Python Wheels
DEV_ALLOWLIST = []