Skip to content

Instantly share code, notes, and snippets.

@tairov
Created June 8, 2018 17:02
Show Gist options
  • Save tairov/cc575aa7a9192f24e471fddb1d602978 to your computer and use it in GitHub Desktop.
Save tairov/cc575aa7a9192f24e471fddb1d602978 to your computer and use it in GitHub Desktop.
shared library jenkins
# shared library
// mylib/vars/myGitlabStage.groovy
call (String _stage, Closure _closure, String _label = 'master') {
stage(_stage) {
node (_label) {
gitlabCommitStatus(name: _stage ) {
_closure()
}
} // node
} //stage
# pipeline
myGitlabStage('super-stage') {
// load gitlab repository
echo "Hello World!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment