File tree Expand file tree Collapse file tree 4 files changed +505
-9
lines changed
Expand file tree Collapse file tree 4 files changed +505
-9
lines changed Original file line number Diff line number Diff line change 1+ entries :
2+ - description : >
3+ For Ansible-based operators, Python package installation in the Docker
4+ image is delegated to a pipenv managed Pipfile and Pipfile.lock, pinning
5+ both the main installed packages and their subdependencies. This prevents
6+ installing conflicting (sub)dependencies
7+
8+ kind: change
9+
10+ breaking: false
Original file line number Diff line number Diff line change @@ -13,18 +13,22 @@ ENV HOME=/opt/ansible \
1313# Install python dependencies
1414# Ensure fresh metadata rather than cached metadata in the base by running
1515# yum clean all && rm -rf /var/yum/cache/* first
16+ # Copy python dependencies specs to be installed using Pipenv
17+ COPY Pipfile* ./
18+ # Instruct pip(env) not to keep a cache of installed packages,
19+ # to install into the global site-packages and
20+ # to clear the pipenv cache as well
21+ ENV PIP_NO_CACHE_DIR=1 \
22+ PIPENV_SYSTEM=1 \
23+ PIPENV_CLEAR=1
24+ # Ensure fresh metadata rather than cached metadata in the base by running
25+ # yum clean all && rm -rf /var/yum/cache/* first
1626RUN yum clean all && rm -rf /var/cache/yum/* \
1727 && yum -y update \
1828 && yum install -y libffi-devel openssl-devel python38-devel gcc python38-pip python38-setuptools \
19- && pip3 install --no-cache-dir \
20- cryptography==3.3.2 \
21- ansible-runner==1.3.4 \
22- ansible-runner-http==1.0.0 \
23- ipaddress==1.0.23 \
24- kubernetes==10.1.0 \
25- openshift==0.10.3 \
26- ansible==2.9.15 \
27- jmespath==0.10.0 \
29+ && pip3 install pipenv==2020.11.15 \
30+ && pipenv install --deploy \
31+ && pipenv check \
2832 && yum remove -y gcc libffi-devel openssl-devel python38-devel \
2933 && yum clean all \
3034 && rm -rf /var/cache/yum
Original file line number Diff line number Diff line change 1+ [[source ]]
2+ url = " https://pypi.org/simple"
3+ verify_ssl = true
4+ name = " pypi"
5+
6+ [packages ]
7+ ansible-runner = " ==1.4.6"
8+ ansible-runner-http = " ==1.0.0"
9+ ipaddress = " ==1.0.23"
10+ openshift = " ==0.11.2"
11+ ansible = " ==2.9.15"
12+ jmespath = " ==0.10.0"
13+
14+ [dev-packages ]
15+
16+ [requires ]
17+ python_version = " 3.8"
You can’t perform that action at this time.
0 commit comments