From 5d28ee8c16551dfb633b67184eb5e152628bb655 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Fri, 24 Feb 2017 14:28:27 +0000 Subject: [PATCH] Change the docker push to be generic Change-Id: I2711dd352edcad1896809ef81259a08c9d9dbabb Signed-off-by: Venkata Harish K Kajur --- jjb/global-templates-java.yaml | 2 +- jjb/include-docker-push.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml index 3560ec490..0def78b51 100644 --- a/jjb/global-templates-java.yaml +++ b/jjb/global-templates-java.yaml @@ -708,7 +708,7 @@ - docker.pull.registry=nexus3.openecomp.org:10001 - docker.push.registry=nexus3.openecomp.org:10003 - - shell: !include-raw: include-docker-push.sh + - shell: !include-raw-escape: include-docker-push.sh - job-template: # Job template for Java daily release jobs diff --git a/jjb/include-docker-push.sh b/jjb/include-docker-push.sh index ec78d9ab1..929b6a25f 100644 --- a/jjb/include-docker-push.sh +++ b/jjb/include-docker-push.sh @@ -6,5 +6,7 @@ SEARCH="aai-service"; if [[ $PROJECT =~ $SEARCH ]] ; then docker push $DOCKER_REPOSITORY/openecomp/ajsc-aai:latest; else - docker push $DOCKER_REPOSITORY/openecomp/model-loader:latest; + # Cut the prefix aai/ in example aai/model-loader + DOCKER_REPO_NAME=$(echo ${PROJECT} | cut -d"/" -f2-); + docker push $DOCKER_REPOSITORY/openecomp/${DOCKER_REPO_NAME}:latest; fi -- 2.16.6