Skip to content

Commit a863fed

Browse files
committed
Updated class-based meta steps to friendly names
1 parent 3c1e588 commit a863fed

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This shows a simple build wrapper example, using the AnsiColorBuildWrapper plugin.
22
node {
33
// This is the current syntax for invoking a build wrapper, naming the class.
4-
wrap([$class: 'AnsiColorBuildWrapper']) {
4+
ansiColor('xterm') {
55
// Just some echoes to show the ANSI color.
66
stage "\u001B[31mI'm Red\u001B[0m Now not"
77
}
8-
}
8+
}

pipeline-examples/external-workspace-manager/externalWorkspace.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ node('test') {
2727
} finally {
2828
// perform workspace cleanup only if the build have passed
2929
// if the build has failed, the workspace will be kept
30-
step([$class: 'WsCleanup', cleanWhenFailure: false])
30+
cleanWs cleanWhenFailure: false
3131
}
3232
}
3333
}

pipeline-examples/jobs-in-parallel/jobs_in_parallel.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ for (int i = 0; i < 4; i++) {
1313
//param1 : an example string parameter for the triggered job.
1414
//dummy: a parameter used to prevent triggering the job with the same parameters value. this parameter has to accept a different value
1515
//each time the job is triggered.
16-
build job: 'test_jobs', parameters: [[$class: 'StringParameterValue', name: 'param1', value:
17-
'test_param'], [$class: 'StringParameterValue', name:'dummy', value: "${index}"]]
18-
}
16+
build job: 'freestyle', parameters: [
17+
string(name: 'param1', value:'test_param'),
18+
string(name:'dummy', value: "${index}")]
19+
}
1920
}
2021
parallel branches

pipeline-examples/push-git-repo/pushGitRepo.Groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
// credentialsId here is the credentials you have set up in Jenkins for pushing
77
// to that repository using username and password.
8-
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'MyID', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
9-
8+
withCredentials([usernamePassword(credentialsId: 'MyID', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
109
sh("git tag -a some_tag -m 'Jenkins'")
1110
sh('git push https://${GIT_USERNAME}:${GIT_PASSWORD}@<REPO> --tags')
1211
}

0 commit comments

Comments
 (0)