Skip to content

Commit

Permalink
No login if no credentials provided
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 authored Oct 1, 2024
1 parent 68247e9 commit c5e52b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build-base-swarm-jenkins-agent.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash
set -e

docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
if [ $DOCKER_LOGIN != '' ] ; then
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
fi

if [ $DOCKER_SYSTEM_PRUNE = 'true' ] ; then
docker system prune -af
Expand Down

0 comments on commit c5e52b9

Please sign in to comment.