File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,10 @@ services:
135
135
depends_on :
136
136
- rabbitmq
137
137
- mongodb
138
+ volumes :
139
+ - " ./jenkins/security.groovy:/usr/share/jenkins/ref/init.groovy.d/security.groovy"
138
140
environment :
139
- - JENKINS_USERNAME=admin
140
- - JENKINS_PASSWORD=admin
141
- # - JENKINS_HOME= # JENKINS_HOME: Jenkins home directory. Default: /opt/bitnami/jenkins/jenkins_home
142
- # - DISABLE_JENKINS_INITIALIZATION=yes # DISABLE_JENKINS_INITIALIZATION: Allows to disable the initial Bitnami configuration for Jenkins. Default: no
143
- # - JAVA_OPTS= # JAVA_OPTS: Customize JVM parameters. No defaults.
141
+ - JAVA_OPTS="-Djenkins.install.runSetupWizard=false" # To make sure unlock screen and plug-in install is skipped on start up
144
142
networks :
145
143
eiffel_2.0_1 :
146
144
aliases :
Original file line number Diff line number Diff line change
1
+ #! groovy
2
+ // Add the user admin explicitly to jenkins
3
+ // Strategy is set to give full access to logged in user
4
+
5
+ import jenkins.model.*
6
+ import hudson.security.*
7
+
8
+ def instance = Jenkins . getInstance()
9
+
10
+ def hudsonRealm = new HudsonPrivateSecurityRealm (false )
11
+ hudsonRealm. createAccount(" admin" , " admin" )
12
+ instance. setSecurityRealm(hudsonRealm)
13
+
14
+ def strategy = new FullControlOnceLoggedInAuthorizationStrategy ()
15
+ instance. setAuthorizationStrategy(strategy)
16
+ instance. save()
You can’t perform that action at this time.
0 commit comments