blob: df267aa4a1d955ad512f37d8a07c0f7437d15af6 [file] [log] [blame]
Mohammed Naseraa48ddb2023-12-30 00:11:22 -05001VERSION 0.7
2
Mohammed Naser403c0422024-01-16 14:36:28 -05003PIP_INSTALL:
4 COMMAND
5 ARG PACKAGES
6 RUN --mount=type=cache,target=/root/.cache \
7 /var/lib/openstack/bin/pip3 install \
8 --constraint /upper-constraints.txt \
9 ${PACKAGES}
10
11GIT_CHECKOUT:
12 COMMAND
13 ARG PROJECT
14 ARG PROJECT_REPO=https://github.com/openstack/${PROJECT}
15 ARG PROJECT_REF
16 GIT CLONE --branch ${PROJECT_REF} ${PROJECT_REPO} /src
17 WORKDIR /src
18 RUN \
19 git remote set-url origin ${PROJECT_REPO} && \
20 git fetch --unshallow
21 COPY --if-exists patches/${PROJECT} /patches
22 IF [ -d /patches ]
23 RUN git apply --verbose /patches/*.patch
24 END
25
26BUILD_VENV:
27 COMMAND
28 ARG PROJECT
Mohammed Naser7a848bc2024-01-22 21:58:11 -050029 ARG PROJECT_REPO=https://github.com/openstack/${PROJECT}
Mohammed Naser403c0422024-01-16 14:36:28 -050030 ARG PROJECT_REF
Mohammed Naser7a848bc2024-01-22 21:58:11 -050031 DO +GIT_CHECKOUT \
32 --PROJECT=${PROJECT} \
33 --PROJECT_REPO=${PROJECT_REPO} \
34 --PROJECT_REF=${PROJECT_REF}
Mohammed Naser403c0422024-01-16 14:36:28 -050035 ARG EXTRAS=""
36 ARG PIP_PACKAGES=""
37 DO +PIP_INSTALL --PACKAGES "/src${EXTRAS} ${PIP_PACKAGES}"
38 SAVE ARTIFACT /var/lib/openstack venv
39
40requirements:
41 FROM ../base+image
42 ARG RELEASE
Mohammed Naser10ab7ef2024-01-17 15:23:33 -050043 IF [ "${RELEASE}" = "master" ]
44 ARG BRANCH=master
45 ELSE
46 ARG BRANCH=stable/${RELEASE}
47 END
48 GIT CLONE --branch ${BRANCH} https://github.com/openstack/requirements /src
49 RUN \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050050 sed -i 's/cryptography===36.0.2/cryptography===41.0.7/' /src/upper-constraints.txt && \
Mohammed Naser21422052024-01-22 15:34:59 -050051 sed -i 's/cryptography===40.0.2/cryptography===41.0.7/' /src/upper-constraints.txt && \
52 sed -i 's/Django===3.2.18/Django===3.2.23/' /src/upper-constraints.txt && \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050053 sed -i 's/Flask===2.2.3/Flask===2.2.5/' /src/upper-constraints.txt && \
Mohammed Naserb3cefe12024-01-22 16:36:05 -050054 sed -i 's/Jinja2===3.1.2/Jinja2===3.1.3/' /src/upper-constraints.txt && \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050055 sed -i 's/paramiko===2.11.0/paramiko===3.4.0/' /src/upper-constraints.txt && \
Mohammed Naserb3cefe12024-01-22 16:36:05 -050056 sed -i 's/paramiko===3.1.0/paramiko===3.4.0/' /src/upper-constraints.txt && \
Rico Lin87af6e02024-01-26 00:19:19 +080057 sed -i 's/pyOpenSSL===22.0.0/pyOpenSSL===23.3.0/' /src/upper-constraints.txt && \
Mohammed Naser21422052024-01-22 15:34:59 -050058 sed -i 's/pyOpenSSL===23.1.1/pyOpenSSL===23.3.0/' /src/upper-constraints.txt && \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050059 sed -i 's/requests===2.28.1/requests===2.31.0/' /src/upper-constraints.txt && \
Mohammed Naser21422052024-01-22 15:34:59 -050060 sed -i 's/requests===2.28.2/requests===2.31.0/' /src/upper-constraints.txt && \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050061 sed -i 's/sqlparse===0.4.2/sqlparse===0.4.4/' /src/upper-constraints.txt && \
62 sed -i 's/urllib3===1.26.12/urllib3===1.26.18/' /src/upper-constraints.txt && \
Mohammed Naser21422052024-01-22 15:34:59 -050063 sed -i 's/urllib3===1.26.15/urllib3===1.26.18/' /src/upper-constraints.txt && \
Mohammed Naser7a848bc2024-01-22 21:58:11 -050064 sed -i 's/Werkzeug===2.2.3/Werkzeug===2.3.8/' /src/upper-constraints.txt && \
Mohammed Naser10ab7ef2024-01-17 15:23:33 -050065 sed -i '/glance-store/d' /src/upper-constraints.txt && \
66 sed -i '/horizon/d' /src/upper-constraints.txt
Mohammed Naser36d353a2024-01-17 13:03:05 -050067 SAVE ARTIFACT /src/upper-constraints.txt
Mohammed Naser403c0422024-01-16 14:36:28 -050068
69builder:
Mohammed Naserc6392302024-01-04 00:43:02 -050070 ARG RELEASE
71 FROM ../cloud-archive-base+image --RELEASE=${RELEASE}
72 DO ../+APT_INSTALL --PACKAGES "\
73 build-essential \
74 curl \
75 git \
76 libldap2-dev \
77 libpcre3-dev \
78 libsasl2-dev \
79 libssl-dev \
80 lsb-release \
81 openssh-client \
82 python3 \
83 python3-dev \
84 python3-pip \
85 python3-venv"
86 RUN --mount type=cache,target=/root/.cache \
Mohammed Naser21422052024-01-22 15:34:59 -050087 python3 -m venv --upgrade-deps --system-site-packages /var/lib/openstack
Mohammed Naser403c0422024-01-16 14:36:28 -050088 COPY \
89 (+requirements/upper-constraints.txt --RELEASE=${RELEASE}) \
90 /upper-constraints.txt
Mohammed Nasera3868672024-01-20 13:54:40 -050091 DO +PIP_INSTALL --PACKAGES "cryptography pymysql python-binary-memcached python-memcached uwsgi"
Mohammed Naserc6392302024-01-04 00:43:02 -050092
Mohammed Naseraa48ddb2023-12-30 00:11:22 -050093image:
Mohammed Naser403c0422024-01-16 14:36:28 -050094 ARG --required RELEASE
Mohammed Naseraa48ddb2023-12-30 00:11:22 -050095 FROM ../cloud-archive-base+image --RELEASE=${RELEASE}
Mohammed Naseraa48ddb2023-12-30 00:11:22 -050096 ENV PATH=/var/lib/openstack/bin:$PATH
Mohammed Naser403c0422024-01-16 14:36:28 -050097 ARG --required PROJECT
98 DO ../+CREATE_PROJECT_USER --PROJECT=${PROJECT}