From 879977651ff80cbc5f3ef5b7f4e4acc53451e30f Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 6 Sep 2016 11:53:39 +0200 Subject: [PATCH] [Docker] Add git branch as an argument to the dockerfile at build time This will be useful for the dockerfiles which need to have this as a parameter to clone the respective repositories. Needed for Functest. Related JIRA: FUNCTEST-458 Change-Id: I6c818bdbc6d9935a6bf5274487540309ce1017b6 Signed-off-by: jose.lausuch --- jjb/opnfv/opnfv-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index ef4738482..860eee05d 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -110,7 +110,7 @@ echo "Tag version to be build and pushed: $DOCKER_TAG" # Start the build echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG" -docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG . +docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG --build-arg BRANCH=$branch . echo "Creating tag '$DOCKER_TAG'..." docker tag -f $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG $DOCKER_REPO_NAME:$DOCKER_TAG -- 2.16.6