From 42698f45ebc135c102bd1e74c4aebde0d3196d3b Mon Sep 17 00:00:00 2001 From: indraniel Date: Wed, 24 Jul 2024 10:21:30 -0500 Subject: [PATCH] + set DOCKER_CONFIG_DIR environment variable - include a useful default value if the DOCKER_CONFIG_DIR environment variable isn't already set. --- start-picsure.sh | 2 ++ update-jenkins.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/start-picsure.sh b/start-picsure.sh index f5c4ed9f..2796f929 100755 --- a/start-picsure.sh +++ b/start-picsure.sh @@ -6,6 +6,8 @@ # - Challenge your own understanding of where files are located in docker and on the host file system and # how that does or doesn't change the commands you run when inside Jenkins +DOCKER_CONFIG_DIR="${DOCKER_CONFIG_DIR:-/usr/local/docker-config}" + if [ -f "$DOCKER_CONFIG_DIR/setProxy.sh" ]; then . $DOCKER_CONFIG_DIR/setProxy.sh fi diff --git a/update-jenkins.sh b/update-jenkins.sh index ed70f575..67f57d7d 100755 --- a/update-jenkins.sh +++ b/update-jenkins.sh @@ -5,6 +5,8 @@ git pull echo "Sometimes we have to update not just the Jenkins jobs, but also the docker image itself." echo "If you want to update that image. Rerun this command with the --rebuild flag added." +DOCKER_CONFIG_DIR="${DOCKER_CONFIG_DIR:-/usr/local/docker-config}" + if [ "$1" = "--rebuild" ]; then # Rebuild the docker image. This matches the initial dep script. The proxy args are generally empty, but you might # run into bugs if you have an http proxy, but don't set it somewhere clever like your bash profile