Guest User

Untitled

a guest
Jul 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. pipeline {
  2. tools {nodejs "NodeJs 8.9.2"}
  3. agent {
  4. label 'test'
  5. }
  6. environment {
  7. isBranchA = "env.GIT_BRANCH.startsWith('abc')"
  8. shouldRunThis = "${isBranchA} || env.GIT_BRANCH == 'develop'"
  9. }
  10. stages {
  11. stage('stagename') {
  12. steps {
  13. script {
  14. if(${shouldRunThis}) {
  15. sh 'npm run start:xy &'
  16. }
  17. }
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment