pipeline {
  agent {
    label "swarm"
  }
  parameters {
    string(
      name: "service",
      defaultValue: "",
      description: "The name of service that should be scaled"
    )
    string(
      name: "scale",
      defaultValue: "",
      description: "Number of replicas to add or remove."
    )
  }
  stages {
    stage("Scale") {
      steps {
        echo "Scaling $service by $scale"
        sh 'ls *.meme'
      }
    }
    post {
      always {
        echo 'It's always goot to be here.'
      }
      changed {
        echo 'Something changed...'
      }
      failure {
        echo 'Oh, snap. It's failed again'
      }
      success {
        echo 'Fine !!! It's SUCCESS !!!'
      }
      unstable {
        echo 'Unstable ....'
      }
      aborted {
        echo 'Hmmm... It's aborted'
      }
  }
}