diff --git a/build-base-k8s-jenkins-agent.sh b/build-base-k8s-jenkins-agent.sh index 49fb115..534440f 100755 --- a/build-base-k8s-jenkins-agent.sh +++ b/build-base-k8s-jenkins-agent.sh @@ -87,6 +87,6 @@ docker build \ -f k8s-jenkins-agent/Dockerfile \ $last_arg -if [ -z "$1" ] ; then +if [[ $PUSH_AGENT != "false" ]] ; then docker push $DOCKER_REGISTRY_URL/base-jenkins-agent:$ONEC_VERSION fi diff --git a/build-base-k8s-jenkins-coverage-agent.sh b/build-base-k8s-jenkins-coverage-agent.sh index 090b206..3c8aa35 100755 --- a/build-base-k8s-jenkins-coverage-agent.sh +++ b/build-base-k8s-jenkins-coverage-agent.sh @@ -20,7 +20,9 @@ if [ "${NO_CACHE}" = 'true' ] ; then fi ./build-edt.sh -./build-base-k8s-jenkins-agent.sh "do_not_push_agent" + +export PUSH_AGENT='false' +./build-base-k8s-jenkins-agent.sh docker build \ --build-arg DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \ diff --git a/build-base-swarm-jenkins-agent.bat b/build-base-swarm-jenkins-agent.bat index 6c1e196..b9d1c41 100644 --- a/build-base-swarm-jenkins-agent.bat +++ b/build-base-swarm-jenkins-agent.bat @@ -94,7 +94,7 @@ docker build ^ if %ERRORLEVEL% neq 0 goto end -IF "%~1"=="" ( +IF NOT "%PUSH_AGENT%"=="false" ( docker push %DOCKER_REGISTRY_URL%/base-jenkins-agent:%ONEC_VERSION% ) diff --git a/build-base-swarm-jenkins-agent.sh b/build-base-swarm-jenkins-agent.sh index e99c311..96142e7 100755 --- a/build-base-swarm-jenkins-agent.sh +++ b/build-base-swarm-jenkins-agent.sh @@ -87,6 +87,6 @@ docker build \ -f swarm-jenkins-agent/Dockerfile \ $last_arg -if [ -z "$1" ] ; then +if [[ $PUSH_AGENT != "false" ]] ; then docker push $DOCKER_REGISTRY_URL/base-jenkins-agent:$ONEC_VERSION fi diff --git a/build-base-swarm-jenkins-coverage-agent.bat b/build-base-swarm-jenkins-coverage-agent.bat index 1c9f63a..425df1f 100644 --- a/build-base-swarm-jenkins-coverage-agent.bat +++ b/build-base-swarm-jenkins-coverage-agent.bat @@ -11,7 +11,9 @@ if %ERRORLEVEL% neq 0 goto end if %NO_CACHE%=="true" (SET last_arg="--no-cache .") else (SET last_arg=".") .\build-edt-swarm-agent.bat -.\build-base-swarm-jenkins-agent.bat "do_not_push_agent" + +set PUSH_AGENT='false' +.\build-base-swarm-jenkins-agent.bat docker build ^ --build-arg DOCKER_REGISTRY_URL=%DOCKER_REGISTRY_URL% ^ diff --git a/build-base-swarm-jenkins-coverage-agent.sh b/build-base-swarm-jenkins-coverage-agent.sh index 217f860..2055470 100755 --- a/build-base-swarm-jenkins-coverage-agent.sh +++ b/build-base-swarm-jenkins-coverage-agent.sh @@ -20,7 +20,9 @@ if [ "${NO_CACHE}" = 'true' ] ; then fi ./build-edt.sh -./build-base-swarm-jenkins-agent.sh "do_not_push_agent" + +export PUSH_AGENT='false' +./build-base-swarm-jenkins-agent.sh docker build \ --build-arg DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \