From 5fbf05d6ccbe60bc15e5446d0f19b9456006cc55 Mon Sep 17 00:00:00 2001 From: Ryan Rousseau Date: Wed, 30 Sep 2020 16:57:26 -0500 Subject: [PATCH] Add logic to copy cacerts to jenkins_data --- deploy.sh | 9 ++++++++- docker-compose.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index b685624..7309f10 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,5 @@ +tag=$(get_octopusvariable "Project.Jenkins.ServerTag") + echo "Stop jenkins-local." systemctl is-active --quiet jenkins-local && systemctl stop jenkins-local @@ -19,8 +21,13 @@ if [ ! -d "jenkins_plugins" ]; then echo "jenkins_plugins/ configured." fi +if [ ! f "jenkins_data/cacerts" ]; then + docker run --volume "$(pwd)/jenkins_data:/bitnami/jenkins" \ + bitnami/jenkins:$tag \ + cp /opt/bitnami/java/jre/lib/security/cacerts /bitnami/jenkins/cacerts +fi + echo "Install plugins." -tag=$(get_octopusvariable "Project.Jenkins.ServerTag") docker run --volume "$(pwd)/jenkins_plugins:/usr/share/jenkins/ref/plugins" \ bitnami/jenkins:$tag \ diff --git a/docker-compose.yml b/docker-compose.yml index 8cfaedc..c046b12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "2" services: jenkins: - image: docker.io/bitnami/jenkins:2-debian-10 + image: docker.io/bitnami/jenkins:latest environment: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "1" JAVA_OPTS: ""