Skip to content

Bug 1414661 - Use block syntax for stages in examples #1142

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions app/views/edit/jenkinsfile-examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
<copy-to-clipboard
display-wide="true"
clipboard-text="'node {
stage \'Build\'
openshiftBuild(buildConfig: \'my-build-config\', showBuildLogs: \'true\')
stage \'Deploy\'
openshiftDeploy(deploymentConfig: \'my-deployment-config\')
stage(\'Build\') {
openshiftBuild(buildConfig: \'my-build-config\', showBuildLogs: \'true\')
}
stage(\'Deploy\') {
openshiftDeploy(deploymentConfig: \'my-deployment-config\')
}
}
'" multiline="true">
</copy-to-clipboard>
Expand All @@ -22,12 +24,15 @@
<copy-to-clipboard
display-wide="true"
clipboard-text="'node(\'maven\') {
stage \'Checkout\'
checkout scm
stage \'Build\'
sh \'mvn install\'
stage \'Unit Test\'
sh \'mvn test\'
stage(\'Checkout\') {
checkout scm
}
stage(\'Build\') {
sh \'mvn install\'
}
stage(\'Unit Test\') {
sh \'mvn test\'
}
}
'" multiline="true">
</copy-to-clipboard>
Expand All @@ -37,8 +42,9 @@
<copy-to-clipboard
display-wide="true"
clipboard-text="'node {
stage \'Approve\'
input \'Promote to production?\'
stage(\'Approve\') {
input \'Promote to production?\'
}
}
'" multiline="true">
</copy-to-clipboard>
Expand Down
30 changes: 18 additions & 12 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -9645,32 +9645,38 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<p>\n" +
"Run an OpenShift build and deployment:\n" +
"<copy-to-clipboard display-wide=\"true\" clipboard-text=\"'node {\n" +
" stage \\'Build\\'\n" +
" openshiftBuild(buildConfig: \\'my-build-config\\', showBuildLogs: \\'true\\')\n" +
" stage \\'Deploy\\'\n" +
" openshiftDeploy(deploymentConfig: \\'my-deployment-config\\')\n" +
" stage(\\'Build\\') {\n" +
" openshiftBuild(buildConfig: \\'my-build-config\\', showBuildLogs: \\'true\\')\n" +
" }\n" +
" stage(\\'Deploy\\') {\n" +
" openshiftDeploy(deploymentConfig: \\'my-deployment-config\\')\n" +
" }\n" +
"}\n" +
"'\" multiline=\"true\">\n" +
"</copy-to-clipboard>\n" +
"</p>\n" +
"<p>\n" +
"Checkout source code and run shell commands on a node labelled <var>maven:</var>\n" +
"<copy-to-clipboard display-wide=\"true\" clipboard-text=\"'node(\\'maven\\') {\n" +
" stage \\'Checkout\\'\n" +
" checkout scm\n" +
" stage \\'Build\\'\n" +
" sh \\'mvn install\\'\n" +
" stage \\'Unit Test\\'\n" +
" sh \\'mvn test\\'\n" +
" stage(\\'Checkout\\') {\n" +
" checkout scm\n" +
" }\n" +
" stage(\\'Build\\') {\n" +
" sh \\'mvn install\\'\n" +
" }\n" +
" stage(\\'Unit Test\\') {\n" +
" sh \\'mvn test\\'\n" +
" }\n" +
"}\n" +
"'\" multiline=\"true\">\n" +
"</copy-to-clipboard>\n" +
"</p>\n" +
"<p>\n" +
"Prompt for manual input:\n" +
"<copy-to-clipboard display-wide=\"true\" clipboard-text=\"'node {\n" +
" stage \\'Approve\\'\n" +
" input \\'Promote to production?\\'\n" +
" stage(\\'Approve\\') {\n" +
" input \\'Promote to production?\\'\n" +
" }\n" +
"}\n" +
"'\" multiline=\"true\">\n" +
"</copy-to-clipboard>\n" +
Expand Down