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