aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-08-06 06:32:14 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-08-06 06:35:37 +0200
commit075e4821dbbb6ac49b25161935a93b957fcd389a (patch)
treeaebea7efcd8617f7749df878aa0bb114b1e962f0
parent41d8a752c2c1d2dc2d6c7f9e465891ae725195ed (diff)
Use alpine edge for py3-distlib only
Alpine 3.12 doesn't offer a version compatible with latest OpenStack constraints. It may fix all issues when compiling Functest for arm [1]. [1] https://travis-ci.org/github/collivier/functest/jobs/715229717 Change-Id: I7f55cafff2c7a34909440c5ca1d1f641194761c9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--ansible/site.yml2
-rw-r--r--build.sh10
-rw-r--r--docker/core/Dockerfile5
3 files changed, 9 insertions, 8 deletions
diff --git a/ansible/site.yml b/ansible/site.yml
index e7e3d102b..2c8307972 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -10,7 +10,7 @@
- repo: _
dport:
container: alpine
- tag: edge
+ tag: '3.12'
steps:
- name: build opnfv/functest-core
containers:
diff --git a/build.sh b/build.sh
index 3ddfdb55b..2a3603b1a 100644
--- a/build.sh
+++ b/build.sh
@@ -34,11 +34,11 @@ for dir in ${amd64_dirs}; do
(docker rmi "${repo}/functest-${dir##**/}:amd64-latest" || true)
done
[ -n "${amd64_dirs}" ] &&
- (docker rmi "${repo}/functest-core:amd64-latest" alpine:edge || true)
+ (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.12 || true)
find . -name Dockerfile -exec git checkout {} +
find . -name Dockerfile -exec sed -i \
- -e "s|alpine:edge|arm64v8/alpine:edge|g" {} +
+ -e "s|alpine:3.12|arm64v8/alpine:3.12|g" {} +
find . -name Dockerfile -exec sed -i \
-e "s|opnfv/functest-core|${repo}/functest-core:arm64-latest|g" {} +
find . -name Dockerfile -exec sed -i \
@@ -52,11 +52,11 @@ for dir in ${arm64_dirs}; do
done
[ -n "${arm64_dirs}" ] &&
(docker rmi "${repo}/functest-core:arm64-latest" \
- arm64v8/alpine:edge || true)
+ arm64v8/alpine:3.12 || true)
find . -name Dockerfile -exec git checkout {} +
find . -name Dockerfile -exec sed -i \
- -e "s|alpine:edge|arm32v6/alpine:edge|g" {} +
+ -e "s|alpine:3.12|arm32v6/alpine:3.12|g" {} +
find . -name Dockerfile -exec sed -i \
-e "s|opnfv/functest-core|${repo}/functest-core:arm-latest|g" {} +
find . -name Dockerfile -exec sed -i \
@@ -70,7 +70,7 @@ for dir in ${arm_dirs}; do
done
[ -n "${arm_dirs}" ] &&
(docker rmi "${repo}/functest-core:arm-latest" \
- arm32v6/alpine:edge || true)
+ arm32v6/alpine:3.12 || true)
find . -name Dockerfile -exec git checkout {} +
exit $?
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 1d5097868..b933af5ca 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:edge
+FROM alpine:3.12
ARG BRANCH=master
ARG OPENSTACK_TAG=master
@@ -11,6 +11,8 @@ RUN apk --no-cache add --update \
apk --no-cache add --virtual .build-deps --update \
python3-dev build-base linux-headers libffi-dev \
openssl-dev libjpeg-turbo-dev && \
+ apk --no-cache add --update --upgrade py3-distlib \
+ --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main && \
git init /src/requirements && \
(cd /src/requirements && \
git fetch --tags https://review.opendev.org/openstack/requirements $OPENSTACK_TAG && \
@@ -20,7 +22,6 @@ RUN apk --no-cache add --update \
git fetch --tags https://gerrit.opnfv.org/gerrit/functest $BRANCH && \
git checkout FETCH_HEAD) && \
sed -i -E /^tempest==+.*$/d /src/requirements/upper-constraints.txt && \
- sed -i -E /^distlib==+.*$/d /src/requirements/upper-constraints.txt && \
case $(uname -m) in aarch*|arm*) sed -i -E /^PyNaCl=/d /src/requirements/upper-constraints.txt && apk add --no-cache py3-pynacl ;; esac && \
sed -i -E /#egg=functest/d /src/functest/upper-constraints.txt && \
pip3 install --no-cache-dir --src /src -c/src/functest/upper-constraints.txt -c/src/requirements/upper-constraints.txt \