OpenShift Plugin for Jenkins (jenkins-plugin): Difference between revisions
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
* Blue/Green deployment pipeline: https://github.com/openshift/origin/blob/master/examples/jenkins/pipeline/bluegreen-pipeline.yaml | * Blue/Green deployment pipeline: https://github.com/openshift/origin/blob/master/examples/jenkins/pipeline/bluegreen-pipeline.yaml | ||
= | =Pipeline DSL= | ||
The pipeline can be scripted or can be specified in a declarative format. A scripted DSL element looks like this: | |||
<syntaxhighlight lang='groovy'> | |||
openshiftBuild(buildConfig: 'something') | |||
</syntaxhighlight> | |||
A declared DSL element looks like this: | |||
<syntaxhighlight lang='groovy'> | |||
openshiftBuild bldCfg: 'something', apiURL: 'https://openshift.default.svc.cluster.local', ... | |||
</syntaxhighlight> | |||
==openshiftBuild== | ==openshiftBuild== |
Revision as of 02:55, 9 December 2017
External
- https://github.com/openshift/jenkins-plugin
- https://github.com/jenkinsci/openshift-pipeline-plugin (associated repository)
Internal
Overview
This is the oldest Jenkins/OpenShift integration plugin, which executes inside Jenkins and implements a series of REST flows that interface with the OpenShift master server via its exposed API. This plugin does not require the oc binary to be present on the host that executes the plugin logic. Other plugin that may be used starting with OpenShift 3.7 is OpenShift Jenkins Pipeline DSL Plugin (jenkins-client-plugin). The "OpenShift Plugin for Jenkins" is currently in maintenance mode.
Pipeline Examples
- jenkins-plugin DSL: https://github.com/NovaOrdis/playground/tree/master/openshift/jenkins-plugin/Jenkinsfile-jenkins-plugin-DSL.groovy
- Low-level maven and oc interaction: https://github.com/NovaOrdis/playground/tree/master/openshift/jenkins-plugin/Jenkinsfile-mvn-oc.groovy
- Maven slave node pipeline: https://github.com/openshift/origin/blob/master/examples/jenkins/pipeline/maven-pipeline.yaml
- Blue/Green deployment pipeline: https://github.com/openshift/origin/blob/master/examples/jenkins/pipeline/bluegreen-pipeline.yaml
Pipeline DSL
The pipeline can be scripted or can be specified in a declarative format. A scripted DSL element looks like this:
openshiftBuild(buildConfig: 'something')
A declared DSL element looks like this:
openshiftBuild bldCfg: 'something', apiURL: 'https://openshift.default.svc.cluster.local', ...
openshiftBuild
openshiftBuild bldCfg