diff --git a/app/styles/_forms.less b/app/styles/_forms.less index bfe3ef4998..7559a439f5 100644 --- a/app/styles/_forms.less +++ b/app/styles/_forms.less @@ -27,9 +27,10 @@ padding: 19px; margin-bottom: 20px; border: 1px solid @color-pf-black-300; - .copy-to-clipboard { - margin-top: 3px; - } +} + +.jenkinsfile-examples .copy-to-clipboard { + margin-top: 3px; } .compute-resource { diff --git a/app/views/edit/jenkinsfile-examples.html b/app/views/edit/jenkinsfile-examples.html index fa29767737..d0903e3146 100644 --- a/app/views/edit/jenkinsfile-examples.html +++ b/app/views/edit/jenkinsfile-examples.html @@ -1,42 +1,46 @@ -
+

A Jenkinsfile is a Groovy script that defines your pipeline. In the Jenkinsfile, you can declare pipeline stages and run one or more steps within each stage. Here are some examples you can use in your pipelines.

- Declare a new pipeline stage called Build: + Run an OpenShift build and deployment: + display-wide="true" + clipboard-text="'node { + stage \'Build\' + openshiftBuild(buildConfig: \'my-build-config\', showBuildLogs: \'true\') + stage \'Deploy\' + openshiftDeploy(deploymentConfig: \'my-deployment-config\') +} +'" multiline="true">

- Start a build for build config my-build-config: + Checkout source code and run shell commands on a node labelled maven: - -

-

- Start a deployment for deployment config my-deployment-config: - - -

-

- Run the shell command make test: - + display-wide="true" + clipboard-text="'node(\'maven\') { + stage \'Checkout\' + checkout scm + stage \'Build\' + sh \'mvn install\' + stage \'Unit Test\' + sh \'mvn test\' +} +'" multiline="true">

Prompt for manual input: + display-wide="true" + clipboard-text="'node { + stage \'Approve\' + input \'Promote to production?\' +} +'" multiline="true">

diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index fa7366b3d6..baff0b9ee0 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -9251,33 +9251,41 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/edit/jenkinsfile-examples.html', - "

\n" + + "
\n" + "

\n" + "A Jenkinsfile is a Groovy script that defines your pipeline. In the Jenkinsfile, you can declare pipeline stages and run one or more steps within each stage. Here are some examples you can use in your pipelines.\n" + "

\n" + "

\n" + - "Declare a new pipeline stage called Build:\n" + - "\n" + - "\n" + - "

\n" + - "

\n" + - "Start a build for build config my-build-config:\n" + - "\n" + - "\n" + - "

\n" + - "

\n" + - "Start a deployment for deployment config my-deployment-config:\n" + - "\n" + + "Run an OpenShift build and deployment:\n" + + "\n" + "\n" + "

\n" + "

\n" + - "Run the shell command make test:\n" + - "\n" + + "Checkout source code and run shell commands on a node labelled maven:\n" + + "\n" + "\n" + "

\n" + "

\n" + "Prompt for manual input:\n" + - "\n" + + "\n" + "\n" + "

\n" + "

\n" + diff --git a/dist/styles/main.css b/dist/styles/main.css index 210fb234d4..79409e1e9f 100644 --- a/dist/styles/main.css +++ b/dist/styles/main.css @@ -3585,7 +3585,7 @@ to{transform:rotate(359deg)} .copy-to-clipboard-multiline pre{background-color:#fff;max-width:100%;overflow-x:auto} .input-group-addon.wildcard-prefix{padding-left:10px} .editor-examples{padding:19px;margin-bottom:20px;border:1px solid #d1d1d1} -.editor-examples .copy-to-clipboard{margin-top:3px} +.jenkinsfile-examples .copy-to-clipboard{margin-top:3px} .compute-resource{margin-bottom:5px} @media (max-width:767px){.compute-resource .inline-select{margin-top:5px} }