summaryrefslogtreecommitdiffstats
path: root/gvnfmadapter
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-05-10 17:24:19 +0800
committerYan Yang <yangyanyj@chinamobile.com>2019-05-10 09:32:23 +0000
commitce8e73903661e866ce86704819fb30b3827b937f (patch)
tree1190b412c7765df4ca0659b9778e73e38d9522f1 /gvnfmadapter
parent8e4cb67379bbbab35439354b8b5d7072ca76be16 (diff)
Add ARG and PKG_VERSION to Dockerfile
Change-Id: Ia08a3d482f938a2bd9dec411abe1e707ef99c339 Issue-ID: VFC-1383 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'gvnfmadapter')
-rw-r--r--gvnfmadapter/docker/Dockerfile3
-rwxr-xr-xgvnfmadapter/docker/build_image.sh2
-rwxr-xr-xgvnfmadapter/docker/docker-env-conf.sh4
3 files changed, 7 insertions, 2 deletions
diff --git a/gvnfmadapter/docker/Dockerfile b/gvnfmadapter/docker/Dockerfile
index ba04755..fe7cf43 100644
--- a/gvnfmadapter/docker/Dockerfile
+++ b/gvnfmadapter/docker/Dockerfile
@@ -2,8 +2,11 @@ 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_verison=${PKG_VERSION}
+
ADD . /service
WORKDIR /service
diff --git a/gvnfmadapter/docker/build_image.sh b/gvnfmadapter/docker/build_image.sh
index 8968edf..920811c 100755
--- a/gvnfmadapter/docker/build_image.sh
+++ b/gvnfmadapter/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/gvnfmadapter/docker/docker-env-conf.sh b/gvnfmadapter/docker/docker-env-conf.sh
index 25104a8..f3fdb9d 100755
--- a/gvnfmadapter/docker/docker-env-conf.sh
+++ b/gvnfmadapter/docker/docker-env-conf.sh
@@ -7,8 +7,8 @@ install_sf(){
apk --no-cache add python-dev libffi-dev musl-dev py2-virtualenv
# get binary zip from nexus - vfc-nfvo-catalog
- wget -q -O vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.gvnfm.gvnfmadapter&a=vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter&v=LATEST&e=zip'
- unzip vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter.zip
+ wget -q -O vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.gvnfm.gvnfmadapter&a=vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter&v=${pkg_verison}-SNAPSHOT&e=zip' && \
+ unzip vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter.zip && \
rm -rf vfc-nfvo-driver-vnfm-gvnfm-gvnfmadapter.zip
wait
pip install --upgrade setuptools pip