Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(env.BRANCH_NAME == "master"){
- //Something
- }else{
- //Something else
- }
- library "lib@${env.BRANCH_NAME}"
- node(){
- sh "mkdir ${Workspace}"
- dir(Workspace){
- checkout([$class: 'GitSCM', branches: [[name: "*/${env.BRANCH_NAME}"]],
- doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [],
- userRemoteConfigs: [[credentialsId: 'git', url:ssh://git@git.example.com/pipeline-sharedlib.git']]])
- try{
- //This
- }catch(Exception e){
- //Something went wrong
- throw e
- }finally{
- //Clean it all up
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement