How to configure Jenkins Stages Parallel vs Sequential

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • In this video, I explain how to configure the Jenkins stages for Parallel vs Sequential execution using declarative syntax. I also show an extra example of how to configure steps execution in parallel. I provide examples of when and how to use these approaches and what should be good practices in cases like theses.

Komentáře • 6

  • @ankitaagarwal9568
    @ankitaagarwal9568 Před 3 lety +1

    I want to ssh multiple remote servers in parallel and perform some executions. How can I perform that in Jenkins?

    • @DevBObs
      @DevBObs  Před 3 lety +1

      I will recommend taking a look at Ansible. You can execute Ansible with Jenkins but if that is the main goal. The right tool will be Ansible and there are multiple reasons why you should do it that way rather than over-complicating your solution with just Jenkins.

  • @raghureddy5220
    @raghureddy5220 Před 3 lety +1

    how to run a specific stage on all nodes matching a label?

    • @DevBObs
      @DevBObs  Před 3 lety

      Great question. Same way you define an agent at root level, it is possible to do the same at stage level. Take a look at the documentation www.jenkins.io/doc/book/pipeline/syntax/#stage-level-agents

  • @sauravrajmitra6804
    @sauravrajmitra6804 Před 3 lety

    How to decide during runtime on which stages to run in parallel...for example I pass the stage names in build with parameters and those stages only should run in parallel...please help with the solution

    • @DevBObs
      @DevBObs  Před 3 lety

      You can create a share library and make decision based on parameters. Keep in mind you can run a specific pipeline based on your inputs. You define both but you decide when to run which one.