Created
February 15, 2017 16:40
-
-
Save matthiasbaldi/b226ff43596e2f02a416ce5656546eaa to your computer and use it in GitHub Desktop.
load groovy file/lib into Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node(label) { | |
step([$class: 'WsCleanup']) | |
sh "wget -O ./pipeline.lib.groovy https://github.com/<url>/pipeline.lib.groovy" | |
def pipelineLib = load 'pipeline.lib.groovy' | |
pipelineLib.checkoutSource(<your params>) | |
pipelineLib.buildProject(<your params>) | |
pipelineLib.publishArtifacts(<your params>) | |
pipelineLib.archiveArtifacts(<your params>) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public checkoutSource(<your params>) { | |
// do something | |
} | |
public buildProject(<your params>) { | |
// do something | |
} | |
public publishArtifacts(<your params>) { | |
// do something | |
} | |
public archiveArtifacts(<your params>) { | |
// do something | |
} | |
return this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment