Prevent tests Dockerfile to use cache of osm-packages repo 10/11410/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 24 Nov 2021 17:28:51 +0000 (18:28 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 25 Nov 2021 08:42:34 +0000 (09:42 +0100)
Change-Id: I867590f408bb401f7bd66785645f7d185ce6861e
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
docker/tests/Dockerfile
jenkins/ci-pipelines/ci_stage_3.groovy

index 115f8fb..4874ef1 100644 (file)
@@ -54,6 +54,7 @@ RUN mv /usr/share/osm-tests/robot-systest /robot-systest
 RUN mv /usr/share/osm-tests/conformance-tests/ /robot-systest/
 RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm
 
+ARG CACHE_DATE=not_a_date
 RUN git clone \
     https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git \
     --recurse-submodules \
index 39fd793..cd7cc8e 100644 (file)
@@ -322,7 +322,8 @@ node("${params.NODE}") {
                                 usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
                     sh "docker login ${INTERNAL_DOCKER_REGISTRY} -u ${USERNAME} -p ${PASSWORD}"
                 }
-                moduleBuildArgs = ""
+                datetime = sh(returnStdout: true, script: "date +%Y-%m-%d:%H:%M:%S").trim()
+                moduleBuildArgs = " --build-arg CACHE_DATE=${datetime}"
                 for (packageName in builtModules.keySet()) {
                     envName=packageName.replaceAll("-","_").toUpperCase()+"_URL"
                     moduleBuildArgs += " --build-arg ${envName}=" + builtModules[packageName]