Advertisement
Guest User

Untitled

a guest
Nov 1st, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.27 KB | None | 0 0
  1.  
  2.  
  3. pipeline {
  4.     agent {
  5.         label 'worker'
  6.     }
  7.    
  8.     stages {
  9.         stage('1') {
  10.             steps {
  11.                 script {
  12.                     currentBuild.result = 'UNSTABLE'
  13.                 }
  14.             }
  15.             post {
  16.                 success {
  17.                     echo "Success"
  18.                 }
  19.                 failure {
  20.                     echo "Failure"
  21.                 }
  22.                 unstable {
  23.                     echo "Unstable"
  24.                 }
  25.             }
  26.         }
  27.         stage('2') {
  28.             steps {
  29.                 echo "2"
  30.             }
  31.             post {
  32.                 success {
  33.                     echo "Success"
  34.                 }
  35.                 failure {
  36.                     echo "Failure"
  37.                 }
  38.                 unstable {
  39.                     echo "Unstable"
  40.                 }
  41.             }
  42.         }
  43.         stage('3') {
  44.             steps {
  45.                 echo "3"
  46.             }
  47.             post {
  48.                 success {
  49.                     echo "Success"
  50.                 }
  51.                 failure {
  52.                     echo "Failure"
  53.                 }
  54.                 unstable {
  55.                     echo "Unstable"
  56.                 }
  57.             }
  58.         }
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement