You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
43
45
@@ -56,7 +58,7 @@ jenkins template represented by jenkinstemplate.json by running these commands a
56
58
If you take this approach, run the following command before attempting to log into Jenkins:
Only include the port in the uri if it is not port 80.
61
63
62
64
Login with the user name used to create the "pipelineproject" and any non-empty password.
@@ -65,7 +67,86 @@ jenkins template represented by jenkinstemplate.json by running these commands a
65
67
66
68
$ oc start-build sample-pipeline
67
69
68
-
Jenkins will: create an instance of the sample-pipeline job, launch a slave, trigger a build in openshift, trigger a
69
-
deployment in openshift, and tear the slave down.
70
+
Jenkins will: create an instance of the sample-pipeline job, launch a slave, trigger a build in openshift, trigger a deployment in openshift, and tear the slave down.
70
71
71
72
If you monitor the pods in your default project, you will also see the slave pod get created and deleted.
73
+
74
+
## Maven Slave Example
75
+
76
+
The `maven-pipeline.yaml` template contains a pipeline that uses a maven node to build and package a WAR.
77
+
It then builds an image with the WAR using a Docker build.
78
+
79
+
To run this example:
80
+
81
+
1. Ensure that you have a running OpenShift environment as described in the basic example
82
+
2. Create a new project for your pipeline on the OpenShift web console:
83
+
1. Login
84
+
2. Click on *New Project*
85
+
3. Enter a project name
86
+
4. Click *Create*
87
+
3. In the *Add to Project* page, click on *Import YAML/JSON*
88
+
4. In a separate browser tab, navigate to [maven-pipeline.yaml](https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/maven-pipeline.yaml) and copy its content.
89
+
5. Paste the YAML text in the text box of the *Import YAML/JSON* tab.
90
+
6. Click on *Create*
91
+
7. Leave *Process the template* checked and click on *Continue*
92
+
8. Modify the URL and Reference of the code repository if you have created your own fork.
93
+
9. Click on *Create*
94
+
10. Navigate to *Builds* -> *Pipelines*
95
+
11. Click on *Start Pipeline* next to *openshift-jee-sample*
96
+
97
+
When the pipeline completes, the openshift-jee-sample application should be deployed and running.
98
+
99
+
## Orchestration Pipeline Example
100
+
101
+
The `mapsapp-pipeline.yaml` template contains a pipeline that instantiates other pipelines and runs them.
102
+
It shows how more than one pipeline can be launched in parallel and how a single Jenkins pipeline
103
+
can work with multiple source code repositories.
104
+
105
+
To run this example:
106
+
107
+
1. Ensure that you have a running OpenShift environment as described in the basic example
108
+
2. Create a new project for your pipeline on the OpenShift web console:
109
+
1. Login
110
+
2. Click on *New Project*
111
+
3. Enter a project name
112
+
4. Click *Create*
113
+
3. In the *Add to Project* page, click on *Import YAML/JSON*
114
+
4. In a separate browser tab, navigate to [mapsapp-pipeline.yaml](https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/mapsapp-pipeline.yaml) and copy its content.
115
+
5. Paste the YAML text in the text box of the *Import YAML/JSON* tab.
116
+
6. Click on *Create*
117
+
7. Leave *Process the template* checked and click on *Continue*
118
+
8. Modify the URLs and References of the sample repositories if you have created your own forks.
119
+
9. Click on *Create*
120
+
10. Navigate to *Builds* -> *Pipelines*
121
+
11. Click on *Start Pipeline* next to *mapsapp-pipeline*
122
+
123
+
On the first pipeline run, there will be a delay as Jenkins is instantiated for the project. The pipeline will instantiate
124
+
other pipelines and those will in turn instantiate OpenShift objects. Once the pipeline has completed, a maps frontend
125
+
should be running with 2 backends: nationalparks and mlbparks.
126
+
127
+
128
+
## Blue Green Deployment Example
129
+
130
+
The `bluegreen-pipeline.yaml` template contains a pipeline that demonstrates alternating blue/green deployments with a manual
131
+
approval step.
132
+
133
+
To run this example:
134
+
135
+
1. Create a fork of https://github.com/openshift/nodejs-ex.git
136
+
2. Create a new project for your pipeline on the OpenShift web console:
137
+
1. Login
138
+
2. Click on *New Project*
139
+
3. Enter a project name
140
+
4. Click *Create*
141
+
3. In the *Add to Project* page, click on *Import YAML/JSON*
142
+
4. In a separate browser tab, navigate to [bluegreen-pipeline.yaml](https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/bluegreen-pipeline.yaml) and copy its content.
143
+
5. Paste the YAML text in the text box of the *Import YAML/JSON* tab.
144
+
6. Click on *Create*
145
+
7. Leave *Process the template* checked and click on *Continue*
146
+
8. Modify the *Git Repository URL* to contain the URL of your fork
147
+
9. Click on *Create*
148
+
10. Navigate to *Builds* -> *Pipelines*
149
+
11. Click on *Start Pipeline* next to *bluegreen-pipeline*
150
+
12. Once the code has been deployed, the pipeline will pause for your approval. Click on the pause icon to approve the deployment of the changes.
151
+
13. Push a change to your fork of the nodejs-ex repository
152
+
14. Start the pipeline again. Go back to step 11 and repeat.
0 commit comments