Skip to content

Commit

Permalink
updated jenkins_password.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Feb 18, 2024
1 parent 233903c commit 6468137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jenkins/jenkins_password.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ config="$srcdir/../docker-compose/jenkins.yml"

if [ -n "${JENKINS_PASSWORD:-}" ]; then
echo "using \$JENKINS_PASSWORD from environment" >&2
elif docker ps &>/dev/null; then
elif docker ps | grep -q jenkins-server; then
# </dev/null stops this swallowing stdin which we need for jenkins_cli.sh create-job
JENKINS_PASSWORD="$(docker-compose -f "$config" exec -T jenkins-server cat /var/jenkins_home/secrets/initialAdminPassword </dev/null)"
#elif kubectl get po -n jenkins -l app.kubernetes.io/component=jenkins-controller -o name 2>/dev/null | grep -q .; then
Expand Down

0 comments on commit 6468137

Please sign in to comment.