Tuesday, November 19, 2019

how to skip stage in jenkins pipeline


Skipped Stages in Jenkins Scripted Pipeline



To show all stages at every build even if not executed is a

good practice and brings transparency into pipelines

with conditional steps or stages. Add the when condition

to a stage of your pipeline:





pipeline {
    agent any
  stages {
    stage ('1 choice') {
      when {
                expression { choice == '1'}
            }
            steps {
                echo "Hello, Choice 1!"
            }
    }
    stage ('2 choice') {
      when {
                expression { choice == '2'}
            }
            steps {
                echo "Hello, Choice 2!"
            }
    }
  stage ('3 choice') {
      when {
                expression { choice == '3'}
            }
            steps {
                echo "Hello, Choice 3!"
            }
        }
  }
}







Wireless Security Configuration: Protect Your Network Now!

Introduction: In today’s connected world, wireless networks are as common as smartphones, and they’re often the gateway to our personal, pr...