Skip to content

Commit

Permalink
Add logic to copy cacerts to jenkins_data
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrousseau committed Sep 30, 2020
1 parent 019505d commit cd9e093
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
tag=$(get_octopusvariable "Project.Jenkins.ServerTag")

echo "Stop jenkins-local."
systemctl is-active --quiet jenkins-local && systemctl stop jenkins-local

Expand All @@ -19,8 +21,14 @@ if [ ! -d "jenkins_plugins" ]; then
echo "jenkins_plugins/ configured."
fi

if [ ! -f "jenkins_data/cacerts" ]; then
echo "Copy cacerts to jenkins_data"
docker run --volume "$(pwd)/jenkins_data:/bitnami/jenkins" \
bitnami/jenkins:$tag \
cp /opt/bitnami/java/jre/lib/security/cacerts /bitnami/jenkins/
fi

echo "Install plugins."
tag=$(get_octopusvariable "Project.Jenkins.ServerTag")

docker run --volume "$(pwd)/jenkins_plugins:/usr/share/jenkins/ref/plugins" \
bitnami/jenkins:$tag \
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: ""
Expand Down

0 comments on commit cd9e093

Please sign in to comment.