Change the docker push to be generic
[ci-management.git] / jjb / include-docker-push.sh
index ec78d9a..929b6a2 100644 (file)
@@ -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