From 019505d7f0626a8a24152a0c2b623bfba5a40706 Mon Sep 17 00:00:00 2001 From: Ryan Rousseau Date: Wed, 30 Sep 2020 14:41:04 -0500 Subject: [PATCH] Add plugin installation --- deploy.sh | 15 +++++++++++++++ docker-compose.yml | 1 + 2 files changed, 16 insertions(+) diff --git a/deploy.sh b/deploy.sh index 858fc9d..b685624 100644 --- a/deploy.sh +++ b/deploy.sh @@ -11,6 +11,21 @@ if [ ! -d "jenkins_data" ]; then echo "jenkins_data/ configured." fi +if [ ! -d "jenkins_plugins" ]; then + echo "Create jenkins_plugins folder." + mkdir jenkins_plugins + echo "Set owner of jenkins_plugins/." + chown -R jenkins:0 jenkins_plugins/ + echo "jenkins_plugins/ configured." +fi + +echo "Install plugins." +tag=$(get_octopusvariable "Project.Jenkins.ServerTag") + +docker run --volume "$(pwd)/jenkins_plugins:/usr/share/jenkins/ref/plugins" \ + bitnami/jenkins:$tag \ + install-plugins.sh octopusdeploy:latest custom-tools-plugin:latest + docker-compose pull docker-compose up -d diff --git a/docker-compose.yml b/docker-compose.yml index 09fd135..8cfaedc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,3 +13,4 @@ services: - 50000:50000 volumes: - ./jenkins_data:/bitnami/jenkins + - ./jenkins_plugins:/usr/share/jenkins/ref/plugins