Skip to content

Commit 9d2f672

Browse files
authored
(actions): Fix Ansible-Operator base image build problems due to cryptography package (#6348)
* revert recent ansible-operator changes including the base.Dockerfile and repinning cryptography to v3.3.2 to fix image build issues that are blocking releases && CI * update changelog * update changelog * fix typo in pipfile * update Pipfile.lock * disregard a CVE for now * disregard a CVE for now * try this * disregard all cryptography CVEs for now * disregard all cryptography CVEs for now * missed one Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
1 parent 93ed65f commit 9d2f672

File tree

7 files changed

+255
-333
lines changed

7 files changed

+255
-333
lines changed

changelog/fragments/01-ansible-image-fixes.yaml renamed to changelog/fragments/04-ansible-revert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
# release notes and/or the migration guide
33
entries:
44
- description: >
5-
For ansible operators: fix a bug where the quay.io/operator-framework/ansible-operator image did not
6-
include the cryptography package on ppc64le & s390x architectures.
5+
(ansible): Revert the cryptography package unpinning and repin to v3.3.2
76
87
# kind is one of:
98
# - addition
109
# - change
1110
# - deprecation
1211
# - removal
1312
# - bugfix
14-
kind: "bugfix"
13+
kind: "change"
1514
1615
# Is this a breaking change?
1716
breaking: false
17+

images/ansible-operator-2.11-preview/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ansible-runner-http = "==1.0.0"
99
ipaddress = "==1.0.23"
1010
openshift = "~=0.13.0"
1111
jmespath = "==0.10.0"
12-
cryptography = "*"
12+
cryptography = "==3.3.2"
1313
ansible-core = "~=2.11.0"
1414
oauthlib = "==3.2.1"
1515

images/ansible-operator-2.11-preview/Pipfile.lock

Lines changed: 109 additions & 131 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

images/ansible-operator-2.11-preview/base.Dockerfile

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
# It is built with dependencies that take a while to download, thus speeding
33
# up ansible deploy jobs.
44

5-
FROM registry.access.redhat.com/ubi8/ubi:8.7 AS builder
5+
FROM registry.access.redhat.com/ubi8/ubi:8.7
6+
ARG TARGETARCH
7+
8+
# Label this image with the repo and commit that built it, for freshmaking purposes.
9+
ARG GIT_COMMIT=devel
10+
LABEL git_commit=$GIT_COMMIT
11+
12+
RUN mkdir -p /etc/ansible \
13+
&& echo "localhost ansible_connection=local" > /etc/ansible/hosts \
14+
&& echo '[defaults]' > /etc/ansible/ansible.cfg \
15+
&& echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
16+
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
617

7-
# Install Rust so that we can ensure backwards compatibility with installing/building the cryptography wheel across all platforms
8-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
9-
ENV PATH="/root/.cargo/bin:${PATH}"
10-
RUN rustc --version
1118

1219
# Copy python dependencies (including ansible) to be installed using Pipenv
1320
COPY Pipfile* ./
@@ -23,38 +30,14 @@ ENV PIP_NO_CACHE_DIR=1 \
2330
RUN set -e && yum clean all && rm -rf /var/cache/yum/* \
2431
&& yum update -y \
2532
&& yum install -y libffi-devel openssl-devel python38-devel gcc python38-pip python38-setuptools \
26-
&& pip3 install --upgrade pip~=23.0.1 \
27-
&& pip3 install pipenv==2023.2.18 \
33+
&& pip3 install --upgrade pip~=21.1.0 \
34+
&& pip3 install pipenv==2022.1.8 \
2835
&& pipenv install --deploy \
29-
&& pipenv check -i 42926 -i 42923 -i 45114 \
36+
&& pipenv check -i 45114 -i 53304 -i 53303 -i 53302 -i 53299 -i 53298 -i 53301 -i 53306 -i 53307 -i 53305 -i 53048 \
3037
&& yum remove -y gcc libffi-devel openssl-devel python38-devel \
3138
&& yum clean all \
3239
&& rm -rf /var/cache/yum
3340

34-
FROM registry.access.redhat.com/ubi8/ubi:8.7
35-
ARG TARGETARCH
36-
37-
# Label this image with the repo and commit that built it, for freshmaking purposes.
38-
ARG GIT_COMMIT=devel
39-
LABEL git_commit=$GIT_COMMIT
40-
41-
RUN mkdir -p /etc/ansible \
42-
&& echo "localhost ansible_connection=local" > /etc/ansible/hosts \
43-
&& echo '[defaults]' > /etc/ansible/ansible.cfg \
44-
&& echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
45-
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
46-
47-
RUN set -e && yum clean all && rm -rf /var/cache/yum/* \
48-
&& yum update -y \
49-
&& yum install -y python38-pip python38-setuptools \
50-
&& pip3 install --upgrade pip~=23.0.1 \
51-
&& pip3 install pipenv==2023.2.18 \
52-
&& yum clean all \
53-
&& rm -rf /var/cache/yum
54-
55-
COPY --from=builder /usr/local/lib64/python3.8/site-packages /usr/local/lib64/python3.8/site-packages
56-
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
57-
5841
ENV TINI_VERSION=v0.19.0
5942
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} \
60-
&& chmod +x /tini && /tini --version
43+
&& chmod +x /tini && /tini --version

images/ansible-operator/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ipaddress = "==1.0.23"
1010
openshift = "~=0.13.0"
1111
ansible = "~=2.9.15"
1212
jmespath = "==0.10.0"
13-
cryptography = "*"
13+
cryptography = "==3.3.2"
1414
oauthlib = "==3.2.1"
1515

1616
[dev-packages]

0 commit comments

Comments
 (0)