-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding/updating Jenkins Pipeline documentation #5720
Adding/updating Jenkins Pipeline documentation #5720
Conversation
@bparees @gabemontero ptal |
[NOTE] | ||
==== | ||
If Jenkins auto-provisioning is enabled on your cluster, and you don't need to make any customizations to the | ||
Jenkins master, you can skip the above step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to jenkins autoprovision doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
spec: | ||
strategy: | ||
jenkinsPipelineStrategy: | ||
jenkinsfile: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above instructions imply this BuildConfig should be created verbatim, but it's incomplete...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like "<pipeline content from below>" would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
} | ||
---- | ||
|
||
Now we can import the build config into our OpenShift cluster with the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/import/create/
s/into/in/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
pipelines by logging into the web console and navigating to Builds -> Pipelines. | ||
|
||
There you should see the sample-nodejs-pipeline that we created, and each stage that we defined in the Jenkinsfile as it is executed. | ||
The stages will be green with a check mark if they complete successfully or red with an x if they failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs some wrap up paragraph saying what should happen if it all works. (builds the app from X, deploys it, tests it, you now have a running copy of your code at location Y, etc).
description subject to change per my other comments on your other PR about what i think the content of the jenkinsfile should actually be.
|
||
== Overview | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"this section intentionally left blank" ?
== OpenShift Jenkins Pipeline Plugin | ||
|
||
The https://github.com/openshift/jenkins-client-plugin[OpenShift Jenkins Pipeline Plugin] must be installed | ||
on your Jenkins slaves so that the OpenShift DSL will be available to process the JenkinsFile for your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not accurate. the plugin only needs to be installed on the master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
|
||
== OpenShift DSL | ||
|
||
The OpenShift Jenkins Pipeline Plugin provides a Domain Specific Language (DSL) for communicating with the OpenShift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client plugin.
the pipeline plugin is the legacy plugin that we are deprecating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
If this behavior is not desirable (if you would like to use a Jenkins server external to OpenShift, for example), | ||
you can use the following procedure to disable it. | ||
|
||
If you are an unpriviledged user, a Service must be created for OpenShift to use. The service name must |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not that a service must be created for openshift to use, it's that a service must be created so the autoprovisioning logic will see it and not autoprovision for you.
also i think this doc can stay where it is, you can just link to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
@@ -83,4 +83,25 @@ xref:../dev_guide/integrating_external_services.adoc#dev-guide-integrating-exter | |||
The latter option could also be used to disable autoprovisioning in select | |||
projects only. | |||
|
|||
== OpenShift Pipeline DSL Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
|
||
[NOTE] | ||
==== | ||
Are you a developer looking for information about using this plugin? If so, see xref:../dev_guide/builds/jenkins_pipeline.adoc#jenkins-pipeline-overview[Jenkins Pipeline Builds]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad link? (jenkins_pipeline_builds.adoc?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
@bparees @gabemontero ptal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this is really coming to together.
I've sprinkled in a fair amount of feed back, but a lot of it is posing questions around possible changes vs. more direct call for change. Or changes for future iterations perhaps.
Anyway, take a look and we'll go from there.
== The Jenkinsfile | ||
|
||
Now that we have created the build config with a jenkinsPipelineStrategy, we need to tell the pipeline what to do. | ||
We will do this by using an inline Jenkinsfile, since we aren't going to be creating our own git repository for this application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a call for change, as I believe I understand the pros/cons of switching approaches, and am fine with this safer path, but I thought it at least noteworthy to point out that placing the Jenkinsfile in the repo in question is the "preferred Jenkins way", for lack of a better term, and more than likely the approach our users will take if their dev process uses Jenkins.
Something to monitor moving forward I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update the doc mentioning that as the preferred way, but thought that the inline jenkinsfile would be better for the example/tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that is what I was assuming the thinking was, and as I tried to convey, I agree, certainly for this initial pass ... if anything else, just leaving some bread crumbs for if/when we revisit.
|
||
== Starting the Pipeline | ||
|
||
We can now start the pipeline with the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm anticipating the user asking "can I start the pipeline from the Jenkins Console?", which he can of course, and heading off that question with noting that as a footnote type blurb, vs. whether that is a rabbit hole / unnecessary further promotion of Jenkins we want to avoid.
In other words, I'm undecided. @bparees @coreydaley - what do you guys think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update with the three main ways to start it, OpenShift web console, OpenShift CLI, and Jenkins console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok cool
// timeout in 20 minutes if the pipeline hasn't completed | ||
timeout(time: 20, unit: 'MINUTES') { | ||
// use a nodejs jenkins slave | ||
node('nodejs') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment could just as easily have been made in the sample PR (and I may make it there as well) ...I mentioned this briefly in an email exchange I believe, maybe in the card ... but certainly reasonable that it could get lost in the shuffle.
The "declarative pipeline syntax" was introduced earlier this year: https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
We've pulled in the necessary plugins, versions, to leverage it. And we have already received questions as to whether we support, do we have examples, etc.
It could be as simple as duplicating all the good stuff @coreydaley has in this sample within the skeleton of declarative pipeline. Leveraging the pipeline
and agent
most notably.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update to use the declarative pipeline, i'll update the other pr with the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok cool ... and yeah, just to be clear, by update I was thinking both forms ... but I'm on the fence there .... perhaps if it is the same core example that is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push to use declarative syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's pick the form we want people to use primarily. if that's declarative, let's just show that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sounds good... declarative "is the future" ... which I believe @coreydaley has ready to push
in lieu of both forms, and with going to declarative, let's put a footnote somewhere that says we also work with the predecessor, which is now referred to as "scripted pipeline"
|
||
== Introduction | ||
|
||
Using the Jenkins OpenShift Client Plugin, you can quickly and easily create Jenkins Pipelines utilizing the OpenShift DSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSL -> fluent DSL
i.e. let's highlight / tout the "sugary fluent-ness" of the syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a mention of the phrase "fluent DSL" anywhere in the existing OpenShift docs repo, I only see one place where it mentions fluent, and that's in the Jenkins Client Plugin repo
"DSL Plugin is a Jenkins plugin which aims to provide a readable, concise, comprehensive, and fluent ".
If it makes sense I can add some language like that to this section, but I hesitate to update everywhere it says DSL to say "fluent DSL"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically we didn't do much of anything in the opnshift docs for the client plugin since it was experimental, so in a general sense I would say its this PR that is beefing up the doc to GA status
As I noted later below, yeah, changing DSL to fluent DSL everywhere is probably overboard, but we should highlight in the client plugin intro that is is fluent styled, etc.
Cool deal re: update in next push ... that said, if he has bandwidth, we should solicit @jupierce 's opinion as client plugin creator on whether we should highlight to some degree the "fluent" nature of the plugin ... as I recall, syntax style was one of the original motivators.
Now that we have created the build config with a jenkinsPipelineStrategy, we need to tell the pipeline what to do. | ||
We will do this by using an inline Jenkinsfile, since we aren't going to be creating our own git repository for this application. | ||
|
||
Below is the Jenkinsfile content which is written in groovy using the OpenShift DSL. We will inline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSL -> fluent DSL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.
dev_guide/jenkins_pipeline.adoc
Outdated
== Overview | ||
|
||
Jenkins Pipelines give you fine-grained control over building, deploying, and promoting your applications on OpenShift. | ||
Using a combination of the Jenkins Pipeline Build Strategy, Jenkinsfiles, and the OpenShift DSL _(provided by the OpenShift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluent DSL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.
dev_guide/jenkins_pipeline.adoc
Outdated
== OpenShift Jenkins Client Plugin | ||
|
||
The https://github.com/openshift/jenkins-client-plugin[OpenShift Jenkins Client Plugin] must be installed | ||
on your Jenkins master so that the OpenShift DSL will be available to use within the JenkinsFile for your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluent DSL
though maybe not every instance of DSL needs to become fluent DSL
... assuming everyone agrees on injecting fluent
....as long as it is emphasized somewhere in the doc, I'm good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, see comment at top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep ... cool deal
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== OpenShift DSL | ||
|
||
The OpenShift Jenkins Client Plugin provides a Domain Specific Language (DSL) for communicating with the OpenShift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... fluent-styled Domain Specific Language
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
runtimes for specific jobs. | ||
|
||
For more detailed information on configuring slave pods using the Kubernets Plugin see https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md[Kubernetes Plugin README]. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should point to the ConfigMap / ImageStream support for dynamically defining slave pods ... should be in the main jenkins image doc
Are you a developer looking for information about using this plugin? If so, see xref:../dev_guide/builds/jenkins_pipeline_builds.adoc#jenkins-pipeline-overview[Jenkins Pipeline Builds]. | ||
==== | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some mention of the sync plugin seems appropriate here ....
- link to the repo readme
- link to detail/pointers in main other_images/jenkins doc
- key points / highlights
-- dynamic job/run creation in jenkins
-- dynamic creation of slave pod templates
-- injecting env vars
-- pipeline visualization in openshift web console
-- integration with jenkins git plugin (passes commit info from openshift builds to jenkins git plugin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
|
||
[[introduction]] | ||
|
||
== Introduction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about openshift pipelines first and foremost and the jenkins openshift client plugin secondarily, so the overview should start by talking about openshift pipelines, before jumping into the client plugin.
(you can have an openshift pipeline that doesn't use the client plugin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
|
||
Once the pipeline has started you should see the following actions performed within your project: | ||
|
||
* a node.js Jenkins slave pod will be created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even before this, the jenkins server in your project will kick off a job instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push (also fixed the pipeline to spin up a node.js slave pod again, had lost it when switch to the declarative syntax)
dev_guide/jenkins_pipeline.adoc
Outdated
The https://github.com/openshift/jenkins-client-plugin[OpenShift Jenkins Client Plugin] must be installed | ||
on your Jenkins master so that the OpenShift DSL will be available to use within the JenkinsFile for your | ||
application. This plugin is installed and enabled by default when using the Jenkins (Ephemeral) or Jenkins | ||
(Persistent) templates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just say it's available by default when using the openshift jenkins image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
[[the-openshift-dsl]] | ||
|
||
== OpenShift DSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be nested one level deeper since it seems like a subsection of the client plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
[NOTE] | ||
==== | ||
The optional *jenkinsfilePath* field specifies the name of the file to use, relative to the source *contextDir*. | ||
If *contextDir* is omitted, it defaults to the root of the repository. If *jenkinsfilePath* is omitted, it defaults to *Jenkinsfile*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this note contradicts the claim above that one of jenkinsFilepath or jenkinsFile must be specified(specifying neither is in fact ok). Also there are two different capitalization styles being used. jenkinsfilePath looks to be the right form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in the next push to clarify the wording.
@gabemontero @bparees ptal |
@@ -0,0 +1,219 @@ | |||
[[dev-guide-jenkins-pipeline-builds]] | |||
= Jenkins Pipeline Builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be calling these openshift pipeline builds. strictly speaking, jenkins is an implementation detail (though one that is a heavily leaked abstraction)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
== Introduction | ||
|
||
Whether you are creating a simple website or a complex web of microservices, it's quick | ||
and easy to use Jenkins Pipelines to build, test, deploy, and promote your applications on OpenShift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easy to use OpenShift Pipelines to build, test.......blah blah. OpenShift Pipelines provide an OpenShift experience around Jenkins Pipelines. (and now you can go talk about jenkins pipelines all you want)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
** the pipeline will wait until the build has completed to trigger the next stage | ||
* a deployment will be started using the *nodejs-mongodb-example* deployment config | ||
** the pipeline will wait until the deployment has completed to trigger the next stage | ||
* if the build and deploy are successful, the *nodejs-mongodb-example:latest* image will be tagged as *nodejs-mongodb-example:stage* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd divide this list into two sections: things that always happen and things the pipeline specifically is doing.
Things that happen always:
- job instance created
- slave pod launched to run your pipeline (as long as your pipeline declares a node, so this one kinda muddies the water between a generic "what happens when you run a pipeline" action and "what the specific pipeline makes happen")
- pipeline runs on slave
- slave is deleted (if one was required for the pipeline)
things this particular pipeline(jenkinsfile) does:
- delete resources
- create a new set of resources
- run an openshift build to produce an app image
- wait for build to complete
- deploy the new app image
- wait for deployment
- tag the image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
@@ -0,0 +1,115 @@ | |||
[[dev-guide-jenkins-pipeline]] | |||
= Jenkins Pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openshift pipelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Overview | ||
|
||
Jenkins Pipelines give you fine-grained control over building, deploying, and promoting your applications on OpenShift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openshift pipelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Jenkins Pipeline Strategy | ||
|
||
In order to take advantage of the OpenShift DSL within your project, you will need to utilize the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to take advantage of OpenShift Pipelines within your project..... (you may or may not use the openshift DSL, you may not use the client plugin at all).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
This strategy defaults to using a *Jenkinsfile* at the root of your source repository, but also provides the | ||
following configuration options: | ||
|
||
* an inline jenkinsFile field within your BuildConfig that utilizes the OpenShift DSL using the groovy syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again doesn't have to use the openshift dsl. that's recommended, depending what you're doing, but not a requirement. Find a way to distinguish "what an openshift pipeline is in general"(a jenkins pipeline strategy buildconfig+a Jenkins file definition) from "here's a great tool to use when you want to talk to openshift from your jenkinsfile"(use the client plugin + openshift DSL in your Jenkinsfile).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Jenkinsfile | ||
|
||
The Jenkinsfile utilizes the standard groovy language syntax along with the OpenShift DSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again the DSL is basically optional. it's something you can use, it's not something you do use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bparees @gabemontero I believe that all feedback has been addressed.
@@ -0,0 +1,219 @@ | |||
[[dev-guide-jenkins-pipeline-builds]] | |||
= Jenkins Pipeline Builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
== Introduction | ||
|
||
Whether you are creating a simple website or a complex web of microservices, it's quick | ||
and easy to use Jenkins Pipelines to build, test, deploy, and promote your applications on OpenShift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
@@ -0,0 +1,115 @@ | |||
[[dev-guide-jenkins-pipeline]] | |||
= Jenkins Pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Overview | ||
|
||
Jenkins Pipelines give you fine-grained control over building, deploying, and promoting your applications on OpenShift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Jenkins Pipeline Strategy | ||
|
||
In order to take advantage of the OpenShift DSL within your project, you will need to utilize the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
|
||
== Jenkinsfile | ||
|
||
The Jenkinsfile utilizes the standard groovy language syntax along with the OpenShift DSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
** the pipeline will wait until the build has completed to trigger the next stage | ||
* a deployment will be started using the *nodejs-mongodb-example* deployment config | ||
** the pipeline will wait until the deployment has completed to trigger the next stage | ||
* if the build and deploy are successful, the *nodejs-mongodb-example:latest* image will be tagged as *nodejs-mongodb-example:stage* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
dev_guide/jenkins_pipeline.adoc
Outdated
This strategy defaults to using a *Jenkinsfile* at the root of your source repository, but also provides the | ||
following configuration options: | ||
|
||
* an inline jenkinsFile field within your BuildConfig that utilizes the OpenShift DSL using the groovy syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
Are you a developer looking for information about using this plugin? If so, see xref:../dev_guide/builds/jenkins_pipeline_builds.adoc#jenkins-pipeline-overview[Jenkins Pipeline Builds]. | ||
==== | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in next push
The OpenShift jenkins Sync Plugin provides the following: | ||
|
||
* dynamic job/run creation in Jenkins | ||
* dynamic creation of slave pod templates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dynamic creation of slave pod templates from either ImageStreams, ImageStreamTags, or ConfigMaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
|
||
[[advanced-topics]] | ||
|
||
== Advanced Topics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was previously discussed I missed it ... but I would move the entire Advanced Topics section to configuring_pipeline_execution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of this section is to get this information into the online documentation and into the hands of developers. There is similar information already in the install_config section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok seems maybe redundant to me then ... or conversely, if we mention this stuff here, we should mention the sync plugin information here as well (it is similar is scope / feel in my opinion)
Thoughts @coreydaley @bparees ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the install config section isn't available to users reading the online docs (because it's assumed they aren't doing install/config)
https://docs.openshift.com/online/welcome/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(which means referencing that section is also going to be problematic of course. might have to ask @bmcelvee what's best to do here).
But i think the goal of getting this in front of developers (who would not be reading the install/config docs) is a valid one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall goal here is to explain to developers what pipelines are/how they work and reference out to more detailed specifics elsewhere. so mentioning the sync plugin makes sense (w/ a link to either the jenkins image doc that talks more about it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can ifdef
the content so it only appears in Online docs, reducing the redundancy in our OCP and Origin docs. Would that be a good solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not great imho, I just don't expect developers to read the install /config docs at all unless we point them there. I'm more concerned that for the online docs we're pointing to an invalid link.
Writing the full content here for online and linking it for origin could be an option but that seems painful to maintain.
Just two minor comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we'll still want to iterate on this a bit, but if you address my last couple nits here i think we can merge and then follow up.
and fluent syntax for rich interactions with an OpenShift API server, allowing for even more fine grained | ||
control over the build, deployment, and promotion of applications on your OpenShift cluster. | ||
|
||
For this example, we are going to create a Jenkins Pipeline that will build, deploy, and verify a Node.js/MongoDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Jenkins Pipeline/OpenShift Pipeline/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in next push
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/nodejs-sample-pipeline.yaml | ||
---- | ||
|
||
For more information about the OpenShift DSL syntax used here see https://jenkins.io/doc/pipeline/steps/openshift-pipeline/[OpenShift Pipeline Steps]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is the right link. that's the legacy plugin. you want to link to the client plugin, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in next push
|
||
* a job instance is created on the Jenkins server | ||
* a slave pod is launched _(if your pipeline requires one)_ | ||
* the pipeline runs on the slave pod _(or the master if no slave is defined)_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/defined/required/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in next push
@bparees ptal, all feedback has been addressed |
and fluent syntax for rich interactions with an OpenShift API server, allowing for even more fine grained | ||
control over the build, deployment, and promotion of applications on your OpenShift cluster. | ||
|
||
For this example, we are going to create a OpenShift Pipeline that will build, deploy, and verify a Node.js/MongoDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/a OpenShift/an OpenShift/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in next push
one last nit, otherwise lgtm and over to @openshift/team-documentation for final review/merge. |
Updating the Developers Guide section to include better documentation about Jenkins Pipelines, how they work, how to create one, etc. Trello: https://trello.com/c/rBojNLGj/1121-5-better-devguide-pipeline-docs-techdebt
@openshift/team-documentation @bmcelvee ptal |
Thanks, @coreydaley! This is going into 3.7? |
@bmcelvee yes, the features are already there, it's just updating docs for them. |
Yes
Ben Parees | OpenShift
On Oct 27, 2017 19:12, "Brandi McElveen Munilla" <[email protected]> wrote:
Thanks, @coreydaley <https://github.com/coreydaley>! This is going into 3.7?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5720 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEvl3tvGZ1zw3i01mrO04iZlGj-yLiNdks5swg8KgaJpZM4P55a->
.
|
…e_example Automatic merge from submit-queue. Adding sample Jenkins Pipeline Adding a sample Jenkins Pipeline in support of documentation updates. Supports: openshift/openshift-docs#5720 Trello: https://trello.com/c/rBojNLGj/1121-5-better-devguide-pipeline-docs-techdebt
@bmcelvee looks like openshift/origin#16880 merged, so this should be good now |
[rev_history] |
Updating the Developers Guide section to include better documentation about Jenkins Pipelines, how they work, how to create one, etc. Trello: https://trello.com/c/rBojNLGj/1121-5-better-devguide-pipeline-docs-techdebt (cherry picked from commit 45ff79b) xref:"openshift#5720"
[dedicated-3.5-stage] Adding/updating Jenkins Pipeline documentation #5720
@bmcelvee - Hey Brandi, this shouldn't have gone into dedicated 3.5 or online 3.6 branches. It should have gone into dedicated-3.7-stage and online-3.7-stage branches instead as this is a 3.7 release. I am going to revert these commits from the stage branches. Same applies to your follow up as well: #6083. Can you pick them to the right branches on Monday? |
Updating the Developers Guide section to include better documentation about
Jenkins Pipelines, how they work, how to create one, etc.
Trello: https://trello.com/c/rBojNLGj/1121-5-better-devguide-pipeline-docs-techdebt
Depends on: openshift/origin#16880