Skip to main content
Improved formatting, use built-in condition 'branch', single quotes for non-interpolated strings
Source Link
pipeline {
    agent any 
    stages { 
       stage(“Tests”'Tests') {
       when {
    when { expression { branch==“master”}branch }'master'
      }
      steps {
        echo “FUT”}'foo'
       }
   
   }
}
pipeline {
    agent any 
    stages { 
       stage(“Tests”) {
            when { expression { branch==“master”} }
            steps { echo “FUT”}
       }
     }
}
pipeline {
  agent any 
  stages { 
    stage('Tests') {
      when {
        branch 'master'
      }
      steps {
        echo 'foo'
      }  
   }
}
pipeline {
    agent any 
    stages { 
       stage(“Tests”) {
             when { expression { branch==“master”} }
              steps { echo “FUT”}
       }
    }
}
pipeline{
agent any 
stages{ 
  stage(“Tests”) {
             when { expression { branch==“master”} }
              steps { echo “FUT”}
}
}
}
pipeline {
    agent any 
    stages { 
       stage(“Tests”) {
            when { expression { branch==“master”} }
            steps { echo “FUT”}
       }
    }
}
deleted 11 characters in body; edited body
Source Link
Ram
  • 139
  • 3
pipeline{
agent any 
stages{ 
  stage(“Tests”) {
             when { expression { beanch==“master”branch==“master”} }
              steps { echo “FUT”}
}
}
}

} } }

pipeline{
agent any 
stages{ 
  stage(“Tests”) {
             when { expression { beanch==“master”} }
              steps { echo “FUT”}

} } }

pipeline{
agent any 
stages{ 
  stage(“Tests”) {
             when { expression { branch==“master”} }
              steps { echo “FUT”}
}
}
}
Source Link
Ram
  • 139
  • 3
Loading