Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- tools {nodejs "NodeJs 8.9.2"}
- agent {
- label 'test'
- }
- environment {
- isBranchA = "env.GIT_BRANCH.startsWith('abc')"
- shouldRunThis = "${isBranchA} || env.GIT_BRANCH == 'develop'"
- }
- stages {
- stage('stagename') {
- steps {
- script {
- if(${shouldRunThis}) {
- sh 'npm run start:xy &'
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment