Skip to content

Commit a23e6c8

Browse files
committed
switch to generated password for jenkins service
1 parent 074e084 commit a23e6c8

File tree

7 files changed

+34
-14
lines changed

7 files changed

+34
-14
lines changed

examples/jenkins/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ Steps
6868
6. Create the sample application configuration
6969

7070
$ oc new-app application-template.json
71+
72+
Note the generated password (JENKINS_PASSWORD) reported in the new-app output, you will need it to login to Jenkins. If you lose this value
73+
you can retrieve it by looking at the environment variable values defined on the jenkins deployment configuration in the web console or by
74+
running:
75+
76+
$ oc env dc/jenkins --list | grep JENKINS_PASSWORD
7177

72-
7. Open the Jenkins service ip:port from step 5 in your browser. Once it is available, login using username `admin` and password `password`.
78+
7. Open the Jenkins service ip:port from step 5 in your browser. Once it is available, login using username `admin` and the password from the previous step.
7379

7480
8. Select the the `OpenShift Sample` job and click `Configure`. You'll see a series of Jenkins build steps defined. These build steps are from the Jenkins plugin for V3 Openshift. Read about the [OpenShift Jenkins plugin](https://github.com/openshift/jenkins-plugin) for details on the various functionality provided. The default values for each of the various build steps listed for the sample job should work as is. You can save your changes to the job, click `Build` and skip to step 11.
7581

examples/jenkins/jenkins-ephemeral-template.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"tags": "instant-app,jenkins"
1111
}
1212
},
13+
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
1314
"objects": [
1415
{
1516
"kind": "Route",
@@ -172,7 +173,8 @@
172173
"displayName": "Jenkins Password",
173174
"description": "Password for the Jenkins 'admin' user.",
174175
"generate": "expression",
175-
"value": "password"
176+
"from": "[a-zA-Z0-9]{16}",
177+
"required": true
176178
},
177179
{
178180
"name": "MEMORY_LIMIT",

examples/jenkins/jenkins-persistent-template.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"tags": "instant-app,jenkins"
1111
}
1212
},
13+
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
1314
"objects": [
1415
{
1516
"kind": "Route",
@@ -189,7 +190,8 @@
189190
"displayName": "Jenkins Password",
190191
"description": "Password for the Jenkins 'admin' user.",
191192
"generate": "expression",
192-
"value": "password"
193+
"from": "[a-zA-Z0-9]{16}",
194+
"required": true
193195
},
194196
{
195197
"name": "MEMORY_LIMIT",

examples/jenkins/pipeline/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ jenkins template represented by jenkinstemplate.json by running these commands a
4040
You should not need to access the jenkins console for anything, but if you want to configure settings or watch the execution,
4141
here are the steps to do so:
4242

43+
First you must determine the jenkins password which was randomly generated for you:
44+
45+
$ oc env dc/jenkins --list | grep JENKINS_PASSWORD
46+
47+
The value will appear as:
48+
49+
JENKINS_PASSWORD=faUXMOFUhRYXO2Gx
50+
4351
If you have a router running (`oc cluster up` provides one), run:
4452

4553
$ oc get route
@@ -48,7 +56,7 @@ jenkins template represented by jenkinstemplate.json by running these commands a
4856

4957
If you do not have a router, you can access jenkins directly via the service ip. Determine the jenkins service ip ("oc get svc") and go to it in your browser on port 80. Do not confuse it with the jenkins-jnlp service.
5058

51-
The login/password are `admin/password`.
59+
Login with the user name is `admin` and the password as determined above.
5260

5361
6. Launch a new build
5462

examples/jenkins/pipeline/jenkinstemplate.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"tags": "instant-app,jenkins"
1111
}
1212
},
13+
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
1314
"objects": [
1415
{
1516
"kind": "Route",
@@ -243,12 +244,13 @@
243244
{
244245
"name": "JENKINS_PASSWORD",
245246
"displayName": "Jenkins Password",
246-
"description": "Password for the Jenkins user.",
247+
"description": "Password for the Jenkins 'admin' user.",
247248
"generate": "expression",
248-
"value": "password"
249+
"from": "[a-zA-Z0-9]{16}",
250+
"required": true
249251
}
250252
],
251253
"labels": {
252-
"template": "jenkins-ephemeral-template"
254+
"template": "jenkins-pipeline-template"
253255
}
254256
}

examples/jenkins/pipeline/samplepipeline.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@
8282
"kind": "Route",
8383
"apiVersion": "v1",
8484
"metadata": {
85-
"name": "route-edge",
85+
"name": "frontend",
8686
"creationTimestamp": null
8787
},
8888
"spec": {
89-
"host": "www.example.com",
9089
"to": {
9190
"kind": "Service",
9291
"name": "frontend"

pkg/bootstrap/bindata.go

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)