Now I'm building using execute shell in Jenkins.
(currently) The code below is built in order. I want to implement this in parallel.
(I want) build action -> test1.py ~ test4.py executed in parallel
Is there a way to build in parallel in this way(execute shell) or other strategy?
You have several options to run things in parallel within a Jenkins pipeline.
The first option is to use the static Parallel Directive Stages which allow you to easily define parallel stages inside your declarative pipeline, something like:
A second and more dynamic option is to use the built in
parallelkeyword which takes a map from branch names to closures:and use it to dynamically create your parallel execution steps, something like:
This code can reside anywhere in a scripted pipeline, and in a
scriptdirective in a declarative pipeline.