From f8ad221b968ac85391d79a11db6546c933947f9d Mon Sep 17 00:00:00 2001 From: yangyan Date: Fri, 10 May 2019 16:10:12 +0800 Subject: Add ARG PKG_VERSION to Dockerfile Change-Id: I5b5aa75a3838a87c2f0aabcd4d721dc36d072be3 Issue-ID: VFC-1383 Signed-off-by: yangyan --- docker/Dockerfile | 2 ++ docker/build_image.sh | 2 ++ docker/docker-env-conf.sh | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) mode change 100755 => 100644 docker/Dockerfile mode change 100755 => 100644 docker/build_image.sh mode change 100755 => 100644 docker/docker-env-conf.sh diff --git a/docker/Dockerfile b/docker/Dockerfile old mode 100755 new mode 100644 index b0854803..51904207 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,8 +2,10 @@ FROM python:2-alpine ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} +ARG PKG_VERSION ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY +ENV pkg_version=${PKG_VERSION} ADD . /service WORKDIR /service diff --git a/docker/build_image.sh b/docker/build_image.sh old mode 100755 new mode 100644 index aec34555..9b050a71 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -13,6 +13,8 @@ DOCKER_REPOSITORY="nexus3.onap.org:10003" IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" TIMESTAMP=$(date +"%Y%m%dT%H%M%S") +BUILD_ARGS+=" --build-arg PKG_VERSION=${VERSION}" + if [ $HTTP_PROXY ]; then BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" fi diff --git a/docker/docker-env-conf.sh b/docker/docker-env-conf.sh old mode 100755 new mode 100644 index 8cb20001..2c355a73 --- a/docker/docker-env-conf.sh +++ b/docker/docker-env-conf.sh @@ -5,7 +5,7 @@ install_sf(){ apk --no-cache update apk --no-cache add bash curl gcc wget mysql-client openssl-dev apk --no-cache add python-dev libffi-dev musl-dev py2-virtualenv - wget -q -O vfc-nfvo-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.lcm&a=vfc-nfvo-lcm&v=LATEST&e=zip' && \ + wget -q -O vfc-nfvo-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.lcm&a=vfc-nfvo-lcm&v=${pkg_version}-SNAPSHOT&e=zip' && \ unzip vfc-nfvo-lcm.zip && \ rm -rf vfc-nfvo-lcm.zip && \ pip install --upgrade setuptools pip && \ -- cgit 1.2.3-korg