Jenkinsfile 785 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. pipeline {
  2. agent {
  3. label "swarm"
  4. }
  5. parameters {
  6. string(
  7. name: "service",
  8. defaultValue: "",
  9. description: "The name of service that should be scaled"
  10. )
  11. string(
  12. name: "scale",
  13. defaultValue: "",
  14. description: "Number of replicas to add or remove."
  15. )
  16. }
  17. stages {
  18. stage("Scale") {
  19. steps {
  20. echo "Scaling $service by $scale"
  21. sh 'pwd'
  22. }
  23. }
  24. }
  25. post {
  26. always {
  27. echo "It's always good to be here."
  28. }
  29. changed {
  30. echo "Something changed..."
  31. }
  32. failure {
  33. echo "Oh, snap. It's failed again"
  34. }
  35. success {
  36. echo "Fine !!! It's SUCCESS !!!"
  37. }
  38. unstable {
  39. echo "Unstable ...."
  40. }
  41. aborted {
  42. echo "Hmmm... It's aborted"
  43. }
  44. }
  45. }