Browse code

disable jenkins auto-deployment

Ben Parees authored on 2016/08/08 02:05:18
Showing 15 changed files
... ...
@@ -5,12 +5,12 @@
5 5
     "name": "jenkins-ephemeral",
6 6
     "creationTimestamp": null,
7 7
     "annotations": {
8
-      "description": "Jenkins service, without persistent storage.\nThe username is 'admin' and the tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
8
+      "description": "Jenkins service, without persistent storage.\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
9 9
       "iconClass": "icon-jenkins",
10 10
       "tags": "instant-app,jenkins"
11 11
     }
12 12
   },
13
-  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.",
13
+  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
14 14
   "objects": [
15 15
     {
16 16
       "kind": "Route",
... ...
@@ -26,6 +26,7 @@
26 26
         },
27 27
         "tls": {
28 28
           "termination": "edge",
29
+          "insecureEdgeTerminationPolicy": "Redirect",
29 30
           "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2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GjAYBgNVBAMMEXd3dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFt\ncGxlQGV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nw2rK1J2NMtQj0KDug7g7HRKl5jbf0QMkMKyTU1fBtZ0cCzvsF4CqV11LK4BSVWaK\nrzkaXe99IVJnH8KdOlDl5Dh/+cJ3xdkClSyeUT4zgb6CCBqg78ePp+nN11JKuJlV\nIG1qdJpB1J5O/kCLsGcTf7RS74MtqMFo96446Zvt7YaBhWPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----"
... ...
@@ -75,6 +76,7 @@
75 75
             }
76 76
           },
77 77
           "spec": {
78
+            "serviceAccountName": "${JENKINS_SERVICE_NAME}",
78 79
             "containers": [
79 80
               {
80 81
                 "name": "jenkins",
... ...
@@ -89,7 +91,7 @@
89 89
                 },
90 90
                 "livenessProbe": {
91 91
                     "timeoutSeconds": 3,
92
-                    "initialDelaySeconds": 60,
92
+                    "initialDelaySeconds": 120,
93 93
                     "httpGet": {
94 94
                         "path": "/login",
95 95
                         "port": 8080
... ...
@@ -99,6 +101,18 @@
99 99
                   {
100 100
                     "name": "JENKINS_PASSWORD",
101 101
                     "value": "${JENKINS_PASSWORD}"
102
+                  },
103
+                  {
104
+                    "name": "KUBERNETES_MASTER",
105
+                    "value": "https://kubernetes.default:443"
106
+                  },
107
+                  {
108
+                    "name": "KUBERNETES_TRUST_CERTIFICATES",
109
+                    "value": "true"
110
+                  },
111
+                  {
112
+                    "name": "JNLP_SERVICE_NAME",
113
+                    "value": "${JNLP_SERVICE_NAME}"
102 114
                   }
103 115
                 ],
104 116
                 "resources": {
... ...
@@ -136,19 +150,42 @@
136 136
       }
137 137
     },
138 138
     {
139
+      "kind": "ServiceAccount",
140
+        "apiVersion": "v1",
141
+        "metadata": {
142
+            "name": "${JENKINS_SERVICE_NAME}"
143
+        }
144
+    },
145
+    {
146
+      "kind": "RoleBinding",
147
+      "apiVersion": "v1",
148
+      "metadata": {
149
+          "name": "${JENKINS_SERVICE_NAME}_edit"
150
+      },
151
+      "groupNames": null,
152
+      "subjects": [
153
+          {
154
+              "kind": "ServiceAccount",
155
+              "name": "${JENKINS_SERVICE_NAME}"
156
+          }
157
+      ],
158
+      "roleRef": {
159
+          "name": "edit"
160
+      }
161
+    },
162
+    {
139 163
       "kind": "Service",
140 164
       "apiVersion": "v1",
141 165
       "metadata": {
142
-        "name": "${JENKINS_SERVICE_NAME}",
143
-        "creationTimestamp": null
166
+        "name": "${JNLP_SERVICE_NAME}"
144 167
       },
145 168
       "spec": {
146 169
         "ports": [
147 170
           {
148
-            "name": "web",
171
+            "name": "agent",
149 172
             "protocol": "TCP",
150
-            "port": 8080,
151
-            "targetPort": 8080,
173
+            "port": 50000,
174
+            "targetPort": 50000,
152 175
             "nodePort": 0
153 176
           }
154 177
         ],
... ...
@@ -159,6 +196,35 @@
159 159
         "type": "ClusterIP",
160 160
         "sessionAffinity": "None"
161 161
       }
162
+    },
163
+    {
164
+       "kind": "Service",
165
+       "apiVersion": "v1",
166
+       "metadata": {
167
+         "name": "${JENKINS_SERVICE_NAME}",
168
+         "annotations": {
169
+           "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
170
+           "service.openshift.io/infrastructure": "true"
171
+         },
172
+         "creationTimestamp": null
173
+       },
174
+       "spec": {
175
+         "ports": [
176
+           {
177
+             "name": "web",
178
+             "protocol": "TCP",
179
+             "port": 80,
180
+             "targetPort": 8080,
181
+             "nodePort": 0
182
+           }
183
+         ],
184
+         "selector": {
185
+           "name": "${JENKINS_SERVICE_NAME}"
186
+         },
187
+         "portalIP": "",
188
+         "type": "ClusterIP",
189
+         "sessionAffinity": "None"
190
+       }
162 191
     }
163 192
   ],
164 193
   "parameters": [
... ...
@@ -169,6 +235,12 @@
169 169
       "value": "jenkins"
170 170
     },
171 171
     {
172
+      "name": "JNLP_SERVICE_NAME",
173
+      "displayName": "Jenkins JNLP Service Name",
174
+      "description": "The name of the service used for master/slave communication.",
175
+      "value": "jenkins-jnlp"
176
+    },
177
+    {
172 178
       "name": "JENKINS_PASSWORD",
173 179
       "displayName": "Jenkins Password",
174 180
       "description": "Password for the Jenkins 'admin' user.",
... ...
@@ -5,12 +5,12 @@
5 5
     "name": "jenkins-persistent",
6 6
     "creationTimestamp": null,
7 7
     "annotations": {
8
-      "description": "Jenkins service, with persistent storage.\nThe username is 'admin' and the tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.\nYou must have persistent volumes available in your cluster to use this template.",
8
+      "description": "Jenkins service, with persistent storage.\nYou must have persistent volumes available in your cluster to use this template.",
9 9
       "iconClass": "icon-jenkins",
10 10
       "tags": "instant-app,jenkins"
11 11
     }
12 12
   },
13
-  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.",
13
+  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
14 14
   "objects": [
15 15
     {
16 16
       "kind": "Route",
... ...
@@ -26,6 +26,7 @@
26 26
         },
27 27
         "tls": {
28 28
           "termination": "edge",
29
+          "insecureEdgeTerminationPolicy": "Redirect",
29 30
           "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm\n47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M\nmNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMA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WPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----"
... ...
@@ -92,6 +93,7 @@
92 92
             }
93 93
           },
94 94
           "spec": {
95
+            "serviceAccountName": "${JENKINS_SERVICE_NAME}",
95 96
             "containers": [
96 97
               {
97 98
                 "name": "jenkins",
... ...
@@ -106,7 +108,7 @@
106 106
                 },
107 107
                 "livenessProbe": {
108 108
                     "timeoutSeconds": 3,
109
-                    "initialDelaySeconds": 60,
109
+                    "initialDelaySeconds": 120,
110 110
                     "httpGet": {
111 111
                         "path": "/login",
112 112
                         "port": 8080
... ...
@@ -116,6 +118,18 @@
116 116
                   {
117 117
                     "name": "JENKINS_PASSWORD",
118 118
                     "value": "${JENKINS_PASSWORD}"
119
+                  },
120
+                  {
121
+                    "name": "KUBERNETES_MASTER",
122
+                    "value": "https://kubernetes.default:443"
123
+                  },
124
+                  {
125
+                    "name": "KUBERNETES_TRUST_CERTIFICATES",
126
+                    "value": "true"
127
+                  },
128
+                  {
129
+                    "name": "JNLP_SERVICE_NAME",
130
+                    "value": "${JNLP_SERVICE_NAME}"
119 131
                   }
120 132
                 ],
121 133
                 "resources": {
... ...
@@ -153,19 +167,42 @@
153 153
       }
154 154
     },
155 155
     {
156
+      "kind": "ServiceAccount",
157
+        "apiVersion": "v1",
158
+        "metadata": {
159
+            "name": "${JENKINS_SERVICE_NAME}"
160
+        }
161
+    },
162
+    {
163
+      "kind": "RoleBinding",
164
+      "apiVersion": "v1",
165
+      "metadata": {
166
+          "name": "${JENKINS_SERVICE_NAME}_edit"
167
+      },
168
+      "groupNames": null,
169
+      "subjects": [
170
+          {
171
+              "kind": "ServiceAccount",
172
+              "name": "${JENKINS_SERVICE_NAME}"
173
+          }
174
+      ],
175
+      "roleRef": {
176
+          "name": "edit"
177
+      }
178
+    },
179
+    {
156 180
       "kind": "Service",
157 181
       "apiVersion": "v1",
158 182
       "metadata": {
159
-        "name": "${JENKINS_SERVICE_NAME}",
160
-        "creationTimestamp": null
183
+        "name": "${JNLP_SERVICE_NAME}"
161 184
       },
162 185
       "spec": {
163 186
         "ports": [
164 187
           {
165
-            "name": "web",
188
+            "name": "agent",
166 189
             "protocol": "TCP",
167
-            "port": 8080,
168
-            "targetPort": 8080,
190
+            "port": 50000,
191
+            "targetPort": 50000,
169 192
             "nodePort": 0
170 193
           }
171 194
         ],
... ...
@@ -176,6 +213,35 @@
176 176
         "type": "ClusterIP",
177 177
         "sessionAffinity": "None"
178 178
       }
179
+    },
180
+    {
181
+       "kind": "Service",
182
+       "apiVersion": "v1",
183
+       "metadata": {
184
+         "name": "${JENKINS_SERVICE_NAME}",
185
+         "annotations": {
186
+           "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
187
+           "service.openshift.io/infrastructure": "true"
188
+         },
189
+         "creationTimestamp": null
190
+       },
191
+       "spec": {
192
+         "ports": [
193
+           {
194
+             "name": "web",
195
+             "protocol": "TCP",
196
+             "port": 80,
197
+             "targetPort": 8080,
198
+             "nodePort": 0
199
+           }
200
+         ],
201
+         "selector": {
202
+           "name": "${JENKINS_SERVICE_NAME}"
203
+         },
204
+         "portalIP": "",
205
+         "type": "ClusterIP",
206
+         "sessionAffinity": "None"
207
+       }
179 208
     }
180 209
   ],
181 210
   "parameters": [
... ...
@@ -186,6 +252,12 @@
186 186
       "value": "jenkins"
187 187
     },
188 188
     {
189
+      "name": "JNLP_SERVICE_NAME",
190
+      "displayName": "Jenkins JNLP Service Name",
191
+      "description": "The name of the service used for master/slave communication.",
192
+      "value": "jenkins-jnlp"
193
+    },
194
+    {
189 195
       "name": "JENKINS_PASSWORD",
190 196
       "displayName": "Jenkins Password",
191 197
       "description": "Password for the Jenkins 'admin' user.",
... ...
@@ -15,7 +15,11 @@ To walk through the example:
15 15
 jenkins template represented by jenkinstemplate.json by running these commands as a cluster admin:
16 16
 
17 17
         $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/image-streams/image-streams-centos7.json -n openshift
18
-        $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/jenkinstemplate.json -n openshift
18
+        $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json -n openshift
19
+
20
+    Note: If you have persistent volumes available in your cluster and prefer to use persistent storage (recommended) for your Jenkins server, register the jenkins-persistent-template.json file as well:
21
+
22
+        $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-persistent-template.json -n openshift
19 23
 
20 24
 2. Login as a normal user (any username is fine)
21 25
 
... ...
@@ -25,29 +29,37 @@ jenkins template represented by jenkinstemplate.json by running these commands a
25 25
 
26 26
         $ oc new-project pipelineproject
27 27
 
28
-4. Run this command to instantiate the template which will create a pipeline buildconfig and some other resources in your project:
28
+4. Run this command to instantiate a Jenkins server and service account in your project:
29
+
30
+    If your have persistent volumes available in your cluster:
31
+
32
+        $ oc new-app jenkins-persistent
33
+
34
+    Otherwise:
35
+
36
+        $ oc new-app jenkins-ephemeral
37
+
38
+    Make a note of the Jenkins password reported by new-app.
29 39
 
30
-        If you used cluster up:
40
+    Note: eventually this will be done automatically when you create a pipeline buildconfig.
41
+
42
+5. Run this command to instantiate the template which will create a pipeline buildconfig and some other resources in your project:
43
+
44
+    If you used cluster up:
45
+    
31 46
         $ oc new-app jenkins-pipeline-example
32 47
 
33
-        Otherwise:
48
+    Otherwise:
49
+    
34 50
         $ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
35 51
 
36 52
     At this point if you run `oc get pods` you should see a jenkins pod, or at least a jenkins-deploy pod. (along with other items in your project)  This pod was created as a result of the new pipeline buildconfig being defined by the sample-pipeline template.
37 53
 
38
-5. View/Manage Jenkins (optional)
54
+6. View/Manage Jenkins (optional)
39 55
 
40 56
     You should not need to access the jenkins console for anything, but if you want to configure settings or watch the execution,
41 57
     here are the steps to do so:
42 58
 
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
-
51 59
     If you have a router running (`oc cluster up` provides one), run:
52 60
 
53 61
         $ oc get route
... ...
@@ -56,7 +68,7 @@ jenkins template represented by jenkinstemplate.json by running these commands a
56 56
 
57 57
     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.
58 58
 
59
-    Login with the user name is `admin` and the password as determined above.
59
+    Login with the user name is `admin` and the password as recorded earlier.
60 60
 
61 61
 6. Launch a new build
62 62
 
63 63
deleted file mode 100644
... ...
@@ -1,256 +0,0 @@
1
-{
2
-  "kind": "Template",
3
-  "apiVersion": "v1",
4
-  "metadata": {
5
-    "name": "jenkins",
6
-    "creationTimestamp": null,
7
-    "annotations": {
8
-      "description": "Jenkins service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
9
-      "iconClass": "icon-jenkins",
10
-      "tags": "instant-app,jenkins"
11
-    }
12
-  },
13
-  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.",
14
-  "objects": [
15
-    {
16
-      "kind": "Route",
17
-      "apiVersion": "v1",
18
-      "metadata": {
19
-        "name": "jenkins",
20
-        "creationTimestamp": null
21
-      },
22
-      "spec": {
23
-        "to": {
24
-          "kind": "Service",
25
-          "name": "${JENKINS_SERVICE_NAME}"
26
-        },
27
-        "tls": {
28
-          "termination": "edge",
29
-          "insecureEdgeTerminationPolicy": "Redirect",
30
-          "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9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1fBtZ0cCzvsF4CqV11LK4BSVWaK\nrzkaXe99IVJnH8KdOlDl5Dh/+cJ3xdkClSyeUT4zgb6CCBqg78ePp+nN11JKuJlV\nIG1qdJpB1J5O/kCLsGcTf7RS74MtqMFo96446Zvt7YaBhWPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----"
33
-        }
34
-      }
35
-    },
36
-    {
37
-      "kind": "DeploymentConfig",
38
-      "apiVersion": "v1",
39
-      "metadata": {
40
-        "name": "${JENKINS_SERVICE_NAME}",
41
-        "creationTimestamp": null
42
-      },
43
-      "spec": {
44
-        "strategy": {
45
-          "type": "Recreate"
46
-        },
47
-        "triggers": [
48
-          {
49
-            "type": "ImageChange",
50
-            "imageChangeParams": {
51
-              "automatic": true,
52
-              "containerNames": [
53
-                "jenkins"
54
-              ],
55
-              "from": {
56
-                "kind": "ImageStreamTag",
57
-                "name": "jenkins:1",
58
-                "namespace": "openshift"
59
-              }
60
-            }
61
-          },
62
-          {
63
-            "type": "ConfigChange"
64
-          }
65
-        ],
66
-        "replicas": 1,
67
-        "selector": {
68
-          "name": "${JENKINS_SERVICE_NAME}"
69
-        },
70
-        "template": {
71
-          "metadata": {
72
-            "creationTimestamp": null,
73
-            "labels": {
74
-              "name": "${JENKINS_SERVICE_NAME}"
75
-            }
76
-          },
77
-          "spec": {
78
-            "serviceAccountName": "${JENKINS_SERVICE_NAME}",
79
-            "containers": [
80
-              {
81
-                "name": "jenkins",
82
-                "image": " ",
83
-                "readinessProbe": {
84
-                  "timeoutSeconds": 3,
85
-                  "initialDelaySeconds": 3,
86
-                  "httpGet": {
87
-                    "path": "/login",
88
-                    "port": 8080
89
-                  }
90
-                },
91
-                "livenessProbe": {
92
-                    "timeoutSeconds": 3,
93
-                    "initialDelaySeconds": 120,
94
-                    "httpGet": {
95
-                        "path": "/login",
96
-                        "port": 8080
97
-                    }
98
-                },
99
-                "env": [
100
-                  {
101
-                    "name": "JENKINS_PASSWORD",
102
-                    "value": "${JENKINS_PASSWORD}"
103
-                  },
104
-                  {
105
-                    "name": "KUBERNETES_MASTER",
106
-                    "value": "https://kubernetes.default:443"
107
-                  },
108
-                  {
109
-                    "name": "KUBERNETES_TRUST_CERTIFICATES",
110
-                    "value": "true"
111
-                  }
112
-                ],
113
-                "resources": {
114
-                  "limits": {
115
-                    "memory": "${MEMORY_LIMIT}"
116
-                  }
117
-                },
118
-                "volumeMounts": [
119
-                  {
120
-                    "name": "${JENKINS_SERVICE_NAME}-data",
121
-                    "mountPath": "/var/lib/jenkins"
122
-                  }
123
-                ],
124
-                "terminationMessagePath": "/dev/termination-log",
125
-                "imagePullPolicy": "IfNotPresent",
126
-                "capabilities": {},
127
-                "securityContext": {
128
-                  "capabilities": {},
129
-                  "privileged": false
130
-                }
131
-              }
132
-            ],
133
-            "volumes": [
134
-              {
135
-                "name": "${JENKINS_SERVICE_NAME}-data",
136
-                "emptyDir": {
137
-                  "medium": ""
138
-                }
139
-              }
140
-            ],
141
-            "restartPolicy": "Always",
142
-            "dnsPolicy": "ClusterFirst"
143
-          }
144
-        }
145
-      }
146
-    },
147
-    {
148
-      "kind": "ServiceAccount",
149
-        "apiVersion": "v1",
150
-        "metadata": {
151
-            "name": "${JENKINS_SERVICE_NAME}"
152
-        }
153
-    },
154
-    {
155
-      "kind": "RoleBinding",
156
-      "apiVersion": "v1",
157
-      "metadata": {
158
-          "name": "${JENKINS_SERVICE_NAME}_edit"
159
-      },
160
-      "groupNames": null,
161
-      "subjects": [
162
-          {
163
-              "kind": "ServiceAccount",
164
-              "name": "${JENKINS_SERVICE_NAME}"
165
-          }
166
-      ],
167
-      "roleRef": {
168
-          "name": "edit"
169
-      }
170
-    },
171
-    {
172
-      "kind": "Service",
173
-      "apiVersion": "v1",
174
-      "metadata": {
175
-        "name": "jenkins-jnlp"
176
-      },
177
-      "spec": {
178
-        "ports": [
179
-          {
180
-            "name": "agent",
181
-            "protocol": "TCP",
182
-            "port": 50000,
183
-            "targetPort": 50000,
184
-            "nodePort": 0
185
-          }
186
-        ],
187
-        "selector": {
188
-          "name": "${JENKINS_SERVICE_NAME}"
189
-        },
190
-        "portalIP": "",
191
-        "type": "ClusterIP",
192
-        "sessionAffinity": "None"
193
-      }
194
-    },
195
-    {
196
-       "kind": "Service",
197
-       "apiVersion": "v1",
198
-       "metadata": {
199
-         "name": "${JENKINS_SERVICE_NAME}",
200
-         "annotations": {
201
-           "service.alpha.openshift.io/dependencies": "[{\"name\": \"jenkins-jnlp\", \"namespace\": \"\", \"kind\": \"Service\"}]",
202
-           "service.openshift.io/infrastructure": "true"
203
-         },
204
-         "creationTimestamp": null
205
-       },
206
-       "spec": {
207
-         "ports": [
208
-           {
209
-             "name": "web",
210
-             "protocol": "TCP",
211
-             "port": 80,
212
-             "targetPort": 8080,
213
-             "nodePort": 0
214
-           }
215
-         ],
216
-         "selector": {
217
-           "name": "${JENKINS_SERVICE_NAME}"
218
-         },
219
-         "portalIP": "",
220
-         "type": "ClusterIP",
221
-         "sessionAffinity": "None"
222
-       }
223
-    }
224
-  ],
225
-  "parameters": [
226
-    {
227
-      "name": "MEMORY_LIMIT",
228
-      "displayName": "Memory Limit",
229
-      "description": "Maximum amount of memory the container can use.",
230
-      "value": "512Mi"
231
-    },
232
-    {
233
-      "name": "NAMESPACE",
234
-      "displayName": "Namespace",
235
-      "description": "The OpenShift Namespace where the ImageStream resides.",
236
-      "value": "openshift"
237
-    },
238
-    {
239
-      "name": "JENKINS_SERVICE_NAME",
240
-      "displayName": "Jenkins Service Name",
241
-      "description": "The name of the OpenShift Service exposed for the Jenkins container.",
242
-      "value": "jenkins"
243
-    },
244
-    {
245
-      "name": "JENKINS_PASSWORD",
246
-      "displayName": "Jenkins Password",
247
-      "description": "Password for the Jenkins 'admin' user.",
248
-      "generate": "expression",
249
-      "from": "[a-zA-Z0-9]{16}",
250
-      "required": true
251
-    }
252
-  ],
253
-  "labels": {
254
-    "template": "jenkins-pipeline-template"
255
-  }
256
-}
... ...
@@ -10,6 +10,7 @@
10 10
       "tags": "instant-app,ruby,mysql,jenkins"
11 11
     }
12 12
   },
13
+  "message": "The Jenkins server is not currently automatically instantiated for you.  Please instantiate one of the Jenkins templates to create a Jenkins server for managing your pipeline build configurations.",
13 14
   "objects": [
14 15
     {
15 16
       "kind": "BuildConfig",
... ...
@@ -12,13 +12,21 @@ if [[ -z "$( which go-bindata )" ]]; then
12 12
 fi
13 13
 
14 14
 pushd "${OS_ROOT}" > /dev/null
15
-  "$(os::util::find-go-binary go-bindata)" -nocompress -nometadata -prefix "bootstrap" -pkg "bootstrap" \
16
-                                   -o "${OUTPUT_PARENT}/pkg/bootstrap/bindata.go" -ignore "README.md" -ignore ".*\.go$" \
17
-                                   ${EXAMPLES}/image-streams/... \
18
-                                   ${EXAMPLES}/db-templates/... \
19
-                                   ${EXAMPLES}/jenkins/pipeline/... \
20
-                                   ${EXAMPLES}/quickstarts/... \
21
-                                   pkg/image/admission/imagepolicy/api/v1/...
15
+"$(os::util::find-go-binary go-bindata)" \
16
+    -nocompress \
17
+    -nometadata \
18
+    -prefix "bootstrap" \
19
+    -pkg "bootstrap" \
20
+    -o "${OUTPUT_PARENT}/pkg/bootstrap/bindata.go" \
21
+    -ignore "README.md" \
22
+    -ignore ".*\.go$" \
23
+    -ignore application-template.json \
24
+    ${EXAMPLES}/image-streams/... \
25
+    ${EXAMPLES}/db-templates/... \
26
+    ${EXAMPLES}/jenkins \
27
+    ${EXAMPLES}/jenkins/pipeline \
28
+    ${EXAMPLES}/quickstarts/... \
29
+    pkg/image/admission/imagepolicy/api/v1/...
22 30
 popd > /dev/null
23 31
 
24 32
 ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret"
... ...
@@ -10,7 +10,8 @@
10 10
 // examples/db-templates/mysql-persistent-template.json
11 11
 // examples/db-templates/postgresql-ephemeral-template.json
12 12
 // examples/db-templates/postgresql-persistent-template.json
13
-// examples/jenkins/pipeline/jenkinstemplate.json
13
+// examples/jenkins/jenkins-ephemeral-template.json
14
+// examples/jenkins/jenkins-persistent-template.json
14 15
 // examples/jenkins/pipeline/samplepipeline.json
15 16
 // examples/quickstarts/cakephp-mysql.json
16 17
 // examples/quickstarts/dancer-mysql.json
... ...
@@ -3151,25 +3152,25 @@ func examplesDbTemplatesPostgresqlPersistentTemplateJson() (*asset, error) {
3151 3151
 	return a, nil
3152 3152
 }
3153 3153
 
3154
-var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3154
+var _examplesJenkinsJenkinsEphemeralTemplateJson = []byte(`{
3155 3155
   "kind": "Template",
3156 3156
   "apiVersion": "v1",
3157 3157
   "metadata": {
3158
-    "name": "jenkins",
3158
+    "name": "jenkins-ephemeral",
3159 3159
     "creationTimestamp": null,
3160 3160
     "annotations": {
3161
-      "description": "Jenkins service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
3161
+      "description": "Jenkins service, without persistent storage.\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
3162 3162
       "iconClass": "icon-jenkins",
3163 3163
       "tags": "instant-app,jenkins"
3164 3164
     }
3165 3165
   },
3166
-  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.",
3166
+  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
3167 3167
   "objects": [
3168 3168
     {
3169 3169
       "kind": "Route",
3170 3170
       "apiVersion": "v1",
3171 3171
       "metadata": {
3172
-        "name": "jenkins",
3172
+        "name": "${JENKINS_SERVICE_NAME}",
3173 3173
         "creationTimestamp": null
3174 3174
       },
3175 3175
       "spec": {
... ...
@@ -3207,9 +3208,10 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3207 3207
               ],
3208 3208
               "from": {
3209 3209
                 "kind": "ImageStreamTag",
3210
-                "name": "jenkins:1",
3211
-                "namespace": "openshift"
3212
-              }
3210
+                "name": "${JENKINS_IMAGE_STREAM_TAG}",
3211
+                "namespace": "${NAMESPACE}"
3212
+              },
3213
+              "lastTriggeredImage": ""
3213 3214
             }
3214 3215
           },
3215 3216
           {
... ...
@@ -3261,6 +3263,10 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3261 3261
                   {
3262 3262
                     "name": "KUBERNETES_TRUST_CERTIFICATES",
3263 3263
                     "value": "true"
3264
+                  },
3265
+                  {
3266
+                    "name": "JNLP_SERVICE_NAME",
3267
+                    "value": "${JNLP_SERVICE_NAME}"
3264 3268
                   }
3265 3269
                 ],
3266 3270
                 "resources": {
... ...
@@ -3325,7 +3331,7 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3325 3325
       "kind": "Service",
3326 3326
       "apiVersion": "v1",
3327 3327
       "metadata": {
3328
-        "name": "jenkins-jnlp"
3328
+        "name": "${JNLP_SERVICE_NAME}"
3329 3329
       },
3330 3330
       "spec": {
3331 3331
         "ports": [
... ...
@@ -3351,7 +3357,7 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3351 3351
        "metadata": {
3352 3352
          "name": "${JENKINS_SERVICE_NAME}",
3353 3353
          "annotations": {
3354
-           "service.alpha.openshift.io/dependencies": "[{\"name\": \"jenkins-jnlp\", \"namespace\": \"\", \"kind\": \"Service\"}]",
3354
+           "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
3355 3355
            "service.openshift.io/infrastructure": "true"
3356 3356
          },
3357 3357
          "creationTimestamp": null
... ...
@@ -3377,6 +3383,26 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3377 3377
   ],
3378 3378
   "parameters": [
3379 3379
     {
3380
+      "name": "JENKINS_SERVICE_NAME",
3381
+      "displayName": "Jenkins Service Name",
3382
+      "description": "The name of the OpenShift Service exposed for the Jenkins container.",
3383
+      "value": "jenkins"
3384
+    },
3385
+    {
3386
+      "name": "JNLP_SERVICE_NAME",
3387
+      "displayName": "Jenkins JNLP Service Name",
3388
+      "description": "The name of the service used for master/slave communication.",
3389
+      "value": "jenkins-jnlp"
3390
+    },
3391
+    {
3392
+      "name": "JENKINS_PASSWORD",
3393
+      "displayName": "Jenkins Password",
3394
+      "description": "Password for the Jenkins 'admin' user.",
3395
+      "generate": "expression",
3396
+      "from": "[a-zA-Z0-9]{16}",
3397
+      "required": true
3398
+    },
3399
+    {
3380 3400
       "name": "MEMORY_LIMIT",
3381 3401
       "displayName": "Memory Limit",
3382 3402
       "description": "Maximum amount of memory the container can use.",
... ...
@@ -3384,42 +3410,348 @@ var _examplesJenkinsPipelineJenkinstemplateJson = []byte(`{
3384 3384
     },
3385 3385
     {
3386 3386
       "name": "NAMESPACE",
3387
-      "displayName": "Namespace",
3388
-      "description": "The OpenShift Namespace where the ImageStream resides.",
3387
+      "displayName": "Jenkins ImageStream Namespace",
3388
+      "description": "The OpenShift Namespace where the Jenkins ImageStream resides.",
3389 3389
       "value": "openshift"
3390 3390
     },
3391 3391
     {
3392
+      "name": "JENKINS_IMAGE_STREAM_TAG",
3393
+      "displayName": "Jenkins ImageStreamTag",
3394
+      "description": "Name of the ImageStreamTag to be used for the Jenkins image.",
3395
+      "value": "jenkins:latest"
3396
+    }
3397
+  ],
3398
+  "labels": {
3399
+    "template": "jenkins-ephemeral-template"
3400
+  }
3401
+}
3402
+`)
3403
+
3404
+func examplesJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) {
3405
+	return _examplesJenkinsJenkinsEphemeralTemplateJson, nil
3406
+}
3407
+
3408
+func examplesJenkinsJenkinsEphemeralTemplateJson() (*asset, error) {
3409
+	bytes, err := examplesJenkinsJenkinsEphemeralTemplateJsonBytes()
3410
+	if err != nil {
3411
+		return nil, err
3412
+	}
3413
+
3414
+	info := bindataFileInfo{name: "examples/jenkins/jenkins-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
3415
+	a := &asset{bytes: bytes, info:  info}
3416
+	return a, nil
3417
+}
3418
+
3419
+var _examplesJenkinsJenkinsPersistentTemplateJson = []byte(`{
3420
+  "kind": "Template",
3421
+  "apiVersion": "v1",
3422
+  "metadata": {
3423
+    "name": "jenkins-persistent",
3424
+    "creationTimestamp": null,
3425
+    "annotations": {
3426
+      "description": "Jenkins service, with persistent storage.\nYou must have persistent volumes available in your cluster to use this template.",
3427
+      "iconClass": "icon-jenkins",
3428
+      "tags": "instant-app,jenkins"
3429
+    }
3430
+  },
3431
+  "message": "A Jenkins service has been created in your project.  The username/password are admin/${JENKINS_PASSWORD}.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
3432
+  "objects": [
3433
+    {
3434
+      "kind": "Route",
3435
+      "apiVersion": "v1",
3436
+      "metadata": {
3437
+        "name": "${JENKINS_SERVICE_NAME}",
3438
+        "creationTimestamp": null
3439
+      },
3440
+      "spec": {
3441
+        "to": {
3442
+          "kind": "Service",
3443
+          "name": "${JENKINS_SERVICE_NAME}"
3444
+        },
3445
+        "tls": {
3446
+          "termination": "edge",
3447
+          "insecureEdgeTerminationPolicy": "Redirect",
3448
+          "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm\n47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M\nmNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC\nMAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd\nTMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+L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PSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----"
3451
+        }
3452
+      }
3453
+    },
3454
+    {
3455
+      "kind": "PersistentVolumeClaim",
3456
+      "apiVersion": "v1",
3457
+      "metadata": {
3458
+        "name": "${JENKINS_SERVICE_NAME}"
3459
+      },
3460
+      "spec": {
3461
+        "accessModes": [
3462
+          "ReadWriteOnce"
3463
+        ],
3464
+        "resources": {
3465
+          "requests": {
3466
+            "storage": "${VOLUME_CAPACITY}"
3467
+          }
3468
+        }
3469
+      }
3470
+    },    
3471
+    {
3472
+      "kind": "DeploymentConfig",
3473
+      "apiVersion": "v1",
3474
+      "metadata": {
3475
+        "name": "${JENKINS_SERVICE_NAME}",
3476
+        "creationTimestamp": null
3477
+      },
3478
+      "spec": {
3479
+        "strategy": {
3480
+          "type": "Recreate"
3481
+        },
3482
+        "triggers": [
3483
+          {
3484
+            "type": "ImageChange",
3485
+            "imageChangeParams": {
3486
+              "automatic": true,
3487
+              "containerNames": [
3488
+                "jenkins"
3489
+              ],
3490
+              "from": {
3491
+                "kind": "ImageStreamTag",
3492
+                "name": "${JENKINS_IMAGE_STREAM_TAG}",
3493
+                "namespace": "${NAMESPACE}"
3494
+              },
3495
+              "lastTriggeredImage": ""
3496
+            }
3497
+          },
3498
+          {
3499
+            "type": "ConfigChange"
3500
+          }
3501
+        ],
3502
+        "replicas": 1,
3503
+        "selector": {
3504
+          "name": "${JENKINS_SERVICE_NAME}"
3505
+        },
3506
+        "template": {
3507
+          "metadata": {
3508
+            "creationTimestamp": null,
3509
+            "labels": {
3510
+              "name": "${JENKINS_SERVICE_NAME}"
3511
+            }
3512
+          },
3513
+          "spec": {
3514
+            "serviceAccountName": "${JENKINS_SERVICE_NAME}",
3515
+            "containers": [
3516
+              {
3517
+                "name": "jenkins",
3518
+                "image": " ",
3519
+                "readinessProbe": {
3520
+                  "timeoutSeconds": 3,
3521
+                  "initialDelaySeconds": 3,
3522
+                  "httpGet": {
3523
+                    "path": "/login",
3524
+                    "port": 8080
3525
+                  }
3526
+                },
3527
+                "livenessProbe": {
3528
+                    "timeoutSeconds": 3,
3529
+                    "initialDelaySeconds": 120,
3530
+                    "httpGet": {
3531
+                        "path": "/login",
3532
+                        "port": 8080
3533
+                    }
3534
+                },
3535
+                "env": [
3536
+                  {
3537
+                    "name": "JENKINS_PASSWORD",
3538
+                    "value": "${JENKINS_PASSWORD}"
3539
+                  },
3540
+                  {
3541
+                    "name": "KUBERNETES_MASTER",
3542
+                    "value": "https://kubernetes.default:443"
3543
+                  },
3544
+                  {
3545
+                    "name": "KUBERNETES_TRUST_CERTIFICATES",
3546
+                    "value": "true"
3547
+                  },
3548
+                  {
3549
+                    "name": "JNLP_SERVICE_NAME",
3550
+                    "value": "${JNLP_SERVICE_NAME}"
3551
+                  }
3552
+                ],
3553
+                "resources": {
3554
+                  "limits": {
3555
+                    "memory": "${MEMORY_LIMIT}"
3556
+                  }
3557
+                },
3558
+                "volumeMounts": [
3559
+                  {
3560
+                    "name": "${JENKINS_SERVICE_NAME}-data",
3561
+                    "mountPath": "/var/lib/jenkins"
3562
+                  }
3563
+                ],
3564
+                "terminationMessagePath": "/dev/termination-log",
3565
+                "imagePullPolicy": "IfNotPresent",
3566
+                "capabilities": {},
3567
+                "securityContext": {
3568
+                  "capabilities": {},
3569
+                  "privileged": false
3570
+                }
3571
+              }
3572
+            ],
3573
+            "volumes": [
3574
+              {
3575
+                "name": "${JENKINS_SERVICE_NAME}-data",
3576
+                "persistentVolumeClaim": {
3577
+                  "claimName": "${JENKINS_SERVICE_NAME}"
3578
+                }
3579
+              }
3580
+            ],
3581
+            "restartPolicy": "Always",
3582
+            "dnsPolicy": "ClusterFirst"
3583
+          }
3584
+        }
3585
+      }
3586
+    },
3587
+    {
3588
+      "kind": "ServiceAccount",
3589
+        "apiVersion": "v1",
3590
+        "metadata": {
3591
+            "name": "${JENKINS_SERVICE_NAME}"
3592
+        }
3593
+    },
3594
+    {
3595
+      "kind": "RoleBinding",
3596
+      "apiVersion": "v1",
3597
+      "metadata": {
3598
+          "name": "${JENKINS_SERVICE_NAME}_edit"
3599
+      },
3600
+      "groupNames": null,
3601
+      "subjects": [
3602
+          {
3603
+              "kind": "ServiceAccount",
3604
+              "name": "${JENKINS_SERVICE_NAME}"
3605
+          }
3606
+      ],
3607
+      "roleRef": {
3608
+          "name": "edit"
3609
+      }
3610
+    },
3611
+    {
3612
+      "kind": "Service",
3613
+      "apiVersion": "v1",
3614
+      "metadata": {
3615
+        "name": "${JNLP_SERVICE_NAME}"
3616
+      },
3617
+      "spec": {
3618
+        "ports": [
3619
+          {
3620
+            "name": "agent",
3621
+            "protocol": "TCP",
3622
+            "port": 50000,
3623
+            "targetPort": 50000,
3624
+            "nodePort": 0
3625
+          }
3626
+        ],
3627
+        "selector": {
3628
+          "name": "${JENKINS_SERVICE_NAME}"
3629
+        },
3630
+        "portalIP": "",
3631
+        "type": "ClusterIP",
3632
+        "sessionAffinity": "None"
3633
+      }
3634
+    },
3635
+    {
3636
+       "kind": "Service",
3637
+       "apiVersion": "v1",
3638
+       "metadata": {
3639
+         "name": "${JENKINS_SERVICE_NAME}",
3640
+         "annotations": {
3641
+           "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
3642
+           "service.openshift.io/infrastructure": "true"
3643
+         },
3644
+         "creationTimestamp": null
3645
+       },
3646
+       "spec": {
3647
+         "ports": [
3648
+           {
3649
+             "name": "web",
3650
+             "protocol": "TCP",
3651
+             "port": 80,
3652
+             "targetPort": 8080,
3653
+             "nodePort": 0
3654
+           }
3655
+         ],
3656
+         "selector": {
3657
+           "name": "${JENKINS_SERVICE_NAME}"
3658
+         },
3659
+         "portalIP": "",
3660
+         "type": "ClusterIP",
3661
+         "sessionAffinity": "None"
3662
+       }
3663
+    }
3664
+  ],
3665
+  "parameters": [
3666
+    {
3392 3667
       "name": "JENKINS_SERVICE_NAME",
3393 3668
       "displayName": "Jenkins Service Name",
3394 3669
       "description": "The name of the OpenShift Service exposed for the Jenkins container.",
3395 3670
       "value": "jenkins"
3396 3671
     },
3397 3672
     {
3673
+      "name": "JNLP_SERVICE_NAME",
3674
+      "displayName": "Jenkins JNLP Service Name",
3675
+      "description": "The name of the service used for master/slave communication.",
3676
+      "value": "jenkins-jnlp"
3677
+    },
3678
+    {
3398 3679
       "name": "JENKINS_PASSWORD",
3399 3680
       "displayName": "Jenkins Password",
3400 3681
       "description": "Password for the Jenkins 'admin' user.",
3401 3682
       "generate": "expression",
3402 3683
       "from": "[a-zA-Z0-9]{16}",
3403 3684
       "required": true
3685
+    },
3686
+    {
3687
+      "name": "MEMORY_LIMIT",
3688
+      "displayName": "Memory Limit",
3689
+      "description": "Maximum amount of memory the container can use.",
3690
+      "value": "512Mi"
3691
+    },
3692
+    {
3693
+      "name": "VOLUME_CAPACITY",
3694
+      "displayName": "Volume Capacity",
3695
+      "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
3696
+      "value": "1Gi",
3697
+      "required": true
3698
+    },
3699
+    {
3700
+      "name": "NAMESPACE",
3701
+      "displayName": "Jenkins ImageStream Namespace",
3702
+      "description": "The OpenShift Namespace where the Jenkins ImageStream resides.",
3703
+      "value": "openshift"
3704
+    },
3705
+    {
3706
+      "name": "JENKINS_IMAGE_STREAM_TAG",
3707
+      "displayName": "Jenkins ImageStreamTag",
3708
+      "description": "Name of the ImageStreamTag to be used for the Jenkins image.",
3709
+      "value": "jenkins:latest"
3404 3710
     }
3405 3711
   ],
3406 3712
   "labels": {
3407
-    "template": "jenkins-pipeline-template"
3713
+    "template": "jenkins-persistent-template"
3408 3714
   }
3409 3715
 }
3410 3716
 `)
3411 3717
 
3412
-func examplesJenkinsPipelineJenkinstemplateJsonBytes() ([]byte, error) {
3413
-	return _examplesJenkinsPipelineJenkinstemplateJson, nil
3718
+func examplesJenkinsJenkinsPersistentTemplateJsonBytes() ([]byte, error) {
3719
+	return _examplesJenkinsJenkinsPersistentTemplateJson, nil
3414 3720
 }
3415 3721
 
3416
-func examplesJenkinsPipelineJenkinstemplateJson() (*asset, error) {
3417
-	bytes, err := examplesJenkinsPipelineJenkinstemplateJsonBytes()
3722
+func examplesJenkinsJenkinsPersistentTemplateJson() (*asset, error) {
3723
+	bytes, err := examplesJenkinsJenkinsPersistentTemplateJsonBytes()
3418 3724
 	if err != nil {
3419 3725
 		return nil, err
3420 3726
 	}
3421 3727
 
3422
-	info := bindataFileInfo{name: "examples/jenkins/pipeline/jenkinstemplate.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
3728
+	info := bindataFileInfo{name: "examples/jenkins/jenkins-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
3423 3729
 	a := &asset{bytes: bytes, info:  info}
3424 3730
 	return a, nil
3425 3731
 }
... ...
@@ -3436,6 +3768,7 @@ var _examplesJenkinsPipelineSamplepipelineJson = []byte(`{
3436 3436
       "tags": "instant-app,ruby,mysql,jenkins"
3437 3437
     }
3438 3438
   },
3439
+  "message": "The Jenkins server is not currently automatically instantiated for you.  Please instantiate one of the Jenkins templates to create a Jenkins server for managing your pipeline build configurations.",
3439 3440
   "objects": [
3440 3441
     {
3441 3442
       "kind": "BuildConfig",
... ...
@@ -6548,7 +6881,8 @@ var _bindata = map[string]func() (*asset, error){
6548 6548
 	"examples/db-templates/mysql-persistent-template.json": examplesDbTemplatesMysqlPersistentTemplateJson,
6549 6549
 	"examples/db-templates/postgresql-ephemeral-template.json": examplesDbTemplatesPostgresqlEphemeralTemplateJson,
6550 6550
 	"examples/db-templates/postgresql-persistent-template.json": examplesDbTemplatesPostgresqlPersistentTemplateJson,
6551
-	"examples/jenkins/pipeline/jenkinstemplate.json": examplesJenkinsPipelineJenkinstemplateJson,
6551
+	"examples/jenkins/jenkins-ephemeral-template.json": examplesJenkinsJenkinsEphemeralTemplateJson,
6552
+	"examples/jenkins/jenkins-persistent-template.json": examplesJenkinsJenkinsPersistentTemplateJson,
6552 6553
 	"examples/jenkins/pipeline/samplepipeline.json": examplesJenkinsPipelineSamplepipelineJson,
6553 6554
 	"examples/quickstarts/cakephp-mysql.json": examplesQuickstartsCakephpMysqlJson,
6554 6555
 	"examples/quickstarts/dancer-mysql.json": examplesQuickstartsDancerMysqlJson,
... ...
@@ -6624,9 +6958,11 @@ var _bintree = &bintree{nil, map[string]*bintree{
6624 6624
 			}},
6625 6625
 		}},
6626 6626
 		"jenkins": &bintree{nil, map[string]*bintree{
6627
+			"jenkins-ephemeral-template.json": &bintree{examplesJenkinsJenkinsEphemeralTemplateJson, map[string]*bintree{
6628
+			}},
6629
+			"jenkins-persistent-template.json": &bintree{examplesJenkinsJenkinsPersistentTemplateJson, map[string]*bintree{
6630
+			}},
6627 6631
 			"pipeline": &bintree{nil, map[string]*bintree{
6628
-				"jenkinstemplate.json": &bintree{examplesJenkinsPipelineJenkinstemplateJson, map[string]*bintree{
6629
-				}},
6630 6632
 				"samplepipeline.json": &bintree{examplesJenkinsPipelineSamplepipelineJson, map[string]*bintree{
6631 6633
 				}},
6632 6634
 			}},
... ...
@@ -87,17 +87,18 @@ var (
87 87
 		"origin centos7 image streams": "examples/image-streams/image-streams-centos7.json",
88 88
 	}
89 89
 	templateLocations = map[string]string{
90
-		"mongodb":            "examples/db-templates/mongodb-ephemeral-template.json",
91
-		"mariadb":            "examples/db-templates/mariadb-ephemeral-template.json",
92
-		"mysql":              "examples/db-templates/mysql-ephemeral-template.json",
93
-		"postgresql":         "examples/db-templates/postgresql-ephemeral-template.json",
94
-		"cakephp quickstart": "examples/quickstarts/cakephp-mysql.json",
95
-		"dancer quickstart":  "examples/quickstarts/dancer-mysql.json",
96
-		"django quickstart":  "examples/quickstarts/django-postgresql.json",
97
-		"nodejs quickstart":  "examples/quickstarts/nodejs-mongodb.json",
98
-		"rails quickstart":   "examples/quickstarts/rails-postgresql.json",
99
-		"jenkins pipeline":   "examples/jenkins/pipeline/jenkinstemplate.json",
100
-		"sample pipeline":    "examples/jenkins/pipeline/samplepipeline.json",
90
+		"mongodb":                     "examples/db-templates/mongodb-ephemeral-template.json",
91
+		"mariadb":                     "examples/db-templates/mariadb-ephemeral-template.json",
92
+		"mysql":                       "examples/db-templates/mysql-ephemeral-template.json",
93
+		"postgresql":                  "examples/db-templates/postgresql-ephemeral-template.json",
94
+		"cakephp quickstart":          "examples/quickstarts/cakephp-mysql.json",
95
+		"dancer quickstart":           "examples/quickstarts/dancer-mysql.json",
96
+		"django quickstart":           "examples/quickstarts/django-postgresql.json",
97
+		"nodejs quickstart":           "examples/quickstarts/nodejs-mongodb.json",
98
+		"rails quickstart":            "examples/quickstarts/rails-postgresql.json",
99
+		"jenkins pipeline ephemeral":  "examples/jenkins/jenkins-ephemeral-template.json",
100
+		"jenkins pipeline persistent": "examples/jenkins/jenkins-persistent-template.json",
101
+		"sample pipeline":             "examples/jenkins/pipeline/samplepipeline.json",
101 102
 	}
102 103
 )
103 104
 
... ...
@@ -53,7 +53,7 @@ func NewJenkingsBootstrapper(serviceClient coreclient.ServicesGetter) admission.
53 53
 }
54 54
 
55 55
 func (a *jenkingsBootstrapper) Admit(attributes admission.Attributes) error {
56
-	if a.jenkinsConfig.Enabled != nil && !*a.jenkinsConfig.Enabled {
56
+	if a.jenkinsConfig.AutoProvisionEnabled == nil || !*a.jenkinsConfig.AutoProvisionEnabled {
57 57
 		return nil
58 58
 	}
59 59
 	if len(attributes.GetSubresource()) != 0 {
... ...
@@ -36,28 +36,38 @@ func TestAdmission(t *testing.T) {
36 36
 			validateClients: noAction,
37 37
 		},
38 38
 		{
39
+			name:            "disabled default",
40
+			attributes:      admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
41
+			validateClients: noAction,
42
+		},
43
+		{
39 44
 			name:            "not a jenkins build",
40 45
 			attributes:      admission.NewAttributesRecord(&buildapi.Build{Spec: buildapi.BuildSpec{CommonSpec: buildapi.CommonSpec{Strategy: buildapi.BuildStrategy{}}}}, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
46
+			jenkinsEnabled:  boolptr(true),
41 47
 			validateClients: noAction,
42 48
 		},
43 49
 		{
44 50
 			name:            "not a build kind",
45 51
 			attributes:      admission.NewAttributesRecord(&kapi.Service{}, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
52
+			jenkinsEnabled:  boolptr(true),
46 53
 			validateClients: noAction,
47 54
 		},
48 55
 		{
49 56
 			name:            "not a build resource",
50 57
 			attributes:      admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("notbuilds"), "", admission.Create, &user.DefaultInfo{}),
58
+			jenkinsEnabled:  boolptr(true),
51 59
 			validateClients: noAction,
52 60
 		},
53 61
 		{
54 62
 			name:            "subresource",
55 63
 			attributes:      admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "subresource", admission.Create, &user.DefaultInfo{}),
64
+			jenkinsEnabled:  boolptr(true),
56 65
 			validateClients: noAction,
57 66
 		},
58 67
 		{
59
-			name:       "service present",
60
-			attributes: admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
68
+			name:           "service present",
69
+			attributes:     admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
70
+			jenkinsEnabled: boolptr(true),
61 71
 			objects: []runtime.Object{
62 72
 				&kapi.Service{ObjectMeta: kapi.ObjectMeta{Namespace: "namespace", Name: "jenkins"}},
63 73
 			},
... ...
@@ -83,9 +93,10 @@ func TestAdmission(t *testing.T) {
83 83
 			},
84 84
 		},
85 85
 		{
86
-			name:       "service missing",
87
-			attributes: admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
88
-			objects:    []runtime.Object{},
86
+			name:           "service missing",
87
+			attributes:     admission.NewAttributesRecord(enableBuild, nil, unversioned.GroupVersionKind{}, "namespace", "name", buildapi.SchemeGroupVersion.WithResource("builds"), "", admission.Create, &user.DefaultInfo{}),
88
+			jenkinsEnabled: boolptr(true),
89
+			objects:        []runtime.Object{},
89 90
 			validateClients: func(kubeClient *fake.Clientset, originClient *testclient.Fake) string {
90 91
 				if len(kubeClient.Actions()) == 0 {
91 92
 					return fmt.Sprintf("missing get service in: %v", kubeClient.Actions())
... ...
@@ -112,8 +123,8 @@ func TestAdmission(t *testing.T) {
112 112
 		admission := NewJenkingsBootstrapper(kubeClient.Core()).(*jenkingsBootstrapper)
113 113
 		admission.openshiftClient = originClient
114 114
 		admission.jenkinsConfig = configapi.JenkinsPipelineConfig{
115
-			Enabled:     tc.jenkinsEnabled,
116
-			ServiceName: "jenkins",
115
+			AutoProvisionEnabled: tc.jenkinsEnabled,
116
+			ServiceName:          "jenkins",
117 117
 		}
118 118
 
119 119
 		err := admission.Admit(tc.attributes)
... ...
@@ -147,9 +147,9 @@ func fuzzInternalObject(t *testing.T, forVersion unversioned.GroupVersion, item
147 147
 		},
148 148
 		func(obj *configapi.JenkinsPipelineConfig, c fuzz.Continue) {
149 149
 			c.FuzzNoCustom(obj)
150
-			if obj.Enabled == nil {
150
+			if obj.AutoProvisionEnabled == nil {
151 151
 				v := c.RandBool()
152
-				obj.Enabled = &v
152
+				obj.AutoProvisionEnabled = &v
153 153
 			}
154 154
 			if len(obj.TemplateNamespace) == 0 {
155 155
 				obj.TemplateNamespace = "value"
... ...
@@ -325,10 +325,10 @@ type AuditConfig struct {
325 325
 
326 326
 // JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy
327 327
 type JenkinsPipelineConfig struct {
328
-	// If the enabled flag is set, a Jenkins server will be spawned from the provided
328
+	// AutoProvisionEnabled determines whether a Jenkins server will be spawned from the provided
329 329
 	// template when the first build config in the project with type JenkinsPipeline
330
-	// is created. When not specified this option defaults to true.
331
-	Enabled *bool
330
+	// is created. When not specified this option defaults to false.
331
+	AutoProvisionEnabled *bool
332 332
 	// TemplateNamespace contains the namespace name where the Jenkins template is stored
333 333
 	TemplateNamespace string
334 334
 	// TemplateName is the name of the default Jenkins template
... ...
@@ -36,16 +36,15 @@ func addDefaultingFuncs(scheme *runtime.Scheme) {
36 36
 				obj.JenkinsPipelineConfig.TemplateNamespace = "openshift"
37 37
 			}
38 38
 			if len(obj.JenkinsPipelineConfig.TemplateName) == 0 {
39
-				obj.JenkinsPipelineConfig.TemplateName = "jenkins"
39
+				obj.JenkinsPipelineConfig.TemplateName = "jenkins-ephemeral"
40 40
 			}
41 41
 			if len(obj.JenkinsPipelineConfig.ServiceName) == 0 {
42 42
 				obj.JenkinsPipelineConfig.ServiceName = "jenkins"
43 43
 			}
44
-			if obj.JenkinsPipelineConfig.Enabled == nil {
45
-				v := true
46
-				obj.JenkinsPipelineConfig.Enabled = &v
44
+			if obj.JenkinsPipelineConfig.AutoProvisionEnabled == nil {
45
+				v := false
46
+				obj.JenkinsPipelineConfig.AutoProvisionEnabled = &v
47 47
 			}
48
-
49 48
 			if obj.MasterClients.OpenShiftLoopbackClientConnectionOverrides == nil {
50 49
 				obj.MasterClients.OpenShiftLoopbackClientConnectionOverrides = &ClientConnectionOverrides{
51 50
 					// historical values
... ...
@@ -308,7 +308,7 @@ func (ImagePolicyConfig) SwaggerDoc() map[string]string {
308 308
 
309 309
 var map_JenkinsPipelineConfig = map[string]string{
310 310
 	"":                  "JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy",
311
-	"enabled":           "If the enabled flag is set, a Jenkins server will be spawned from the provided template when the first build config in the project with type JenkinsPipeline is created. When not specified this option defaults to true.",
311
+	"enabled":           "AutoProvisionEnabled determines whether a Jenkins server will be spawned from the provided template when the first build config in the project with type JenkinsPipeline is created. When not specified this option defaults to false.",
312 312
 	"templateNamespace": "TemplateNamespace contains the namespace name where the Jenkins template is stored",
313 313
 	"templateName":      "TemplateName is the name of the default Jenkins template",
314 314
 	"serviceName":       "ServiceName is the name of the Jenkins service OpenShift uses to detect whether a Jenkins pipeline handler has already been installed in a project. This value *must* match a service name in the provided template.",
... ...
@@ -256,10 +256,10 @@ type AuditConfig struct {
256 256
 
257 257
 // JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy
258 258
 type JenkinsPipelineConfig struct {
259
-	// If the enabled flag is set, a Jenkins server will be spawned from the provided
259
+	// AutoProvisionEnabled determines whether a Jenkins server will be spawned from the provided
260 260
 	// template when the first build config in the project with type JenkinsPipeline
261
-	// is created. When not specified this option defaults to true.
262
-	Enabled *bool `json:"enabled"`
261
+	// is created. When not specified this option defaults to false.
262
+	AutoProvisionEnabled *bool `json:"enabled"`
263 263
 	// TemplateNamespace contains the namespace name where the Jenkins template is stored
264 264
 	TemplateNamespace string `json:"templateNamespace"`
265 265
 	// TemplateName is the name of the default Jenkins template