Skip to content

Commit

Permalink
replace argument to env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Nov 16, 2024
1 parent 27011bd commit 67312f1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build-base-k8s-jenkins-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion build-base-k8s-jenkins-coverage-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion build-base-swarm-jenkins-agent.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%
)

Expand Down
2 changes: 1 addition & 1 deletion build-base-swarm-jenkins-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion build-base-swarm-jenkins-coverage-agent.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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% ^
Expand Down
4 changes: 3 additions & 1 deletion build-base-swarm-jenkins-coverage-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 67312f1

Please sign in to comment.