diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-09 11:48:36 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-09 11:48:36 +0800 |
commit | 3ac92210eef64938306f908077cef7d81cc66159 (patch) | |
tree | 90f195c0571567bed9dd5bfc97f0df2e2fa4c55c | |
parent | 88a38a5eabaacdf769438efd14679ba320cd58c6 (diff) |
Add ARG PKG_VERSION to Dockerfile
Change-Id: I2b56d337d135dd6a91bc07af4ea089c6d8bf0524
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
4 files changed, 8 insertions, 2 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile b/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile index 6123a49a..56b9c30a 100644 --- a/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile +++ b/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile @@ -8,6 +8,7 @@ FROM centos:7 +ARG PKG_VERSION RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo @@ -41,7 +42,7 @@ ENV CATALINA_HOME /service # Set up microservice -RUN wget -q -O nfvo-driver-vnfm-huawei.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter&a=hw-vnfmadapter-deployment&v=LATEST&e=zip" && unzip -q -o -B nfvo-driver-vnfm-huawei.zip && rm -f nfvo-driver-vnfm-huawei.zip +RUN wget -q -O nfvo-driver-vnfm-huawei.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter&a=hw-vnfmadapter-deployment&v=${PKG_VERSION}-SNAPSHOT&e=zip" && unzip -q -o -B nfvo-driver-vnfm-huawei.zip && rm -f nfvo-driver-vnfm-huawei.zip # Set permissions RUN find . -type d -exec chmod o-w {} \; RUN find . -name "*.sh" -exec chmod +x {} \; diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh b/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh index eae0fb04..769c248f 100755 --- a/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh +++ b/huawei/vnfmadapter/VnfmadapterService/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/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile index 0e1d2c94..0a140c5f 100755 --- a/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile +++ b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile @@ -8,6 +8,7 @@ FROM centos:7 +ARG PKG_VERSION RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo @@ -42,7 +43,7 @@ ENV CATALINA_HOME /service # Set up microservice -RUN wget -q -O nfvo-driver-vnfm-nokia.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm&a=vfcadaptor-deployment&v=LATEST&e=zip" && unzip -q -o -B nfvo-driver-vnfm-nokia.zip && rm -f nfvo-driver-vnfm-nokia.zip +RUN wget -q -O nfvo-driver-vnfm-nokia.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm&a=vfcadaptor-deployment&v=${PKG_VERSION}-SNAPSHOT&e=zip" && unzip -q -o -B nfvo-driver-vnfm-nokia.zip && rm -f nfvo-driver-vnfm-nokia.zip # Set permissions RUN find . -type d -exec chmod o-w {} \; RUN find . -name "*.sh" -exec chmod +x {} \; diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh index 1f0d8647..3dd2c4f6 100755 --- a/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh +++ b/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh @@ -29,6 +29,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 |