-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
I would like to be able to easily run the same steps across multiple nodes using the declarative pipeline and a shared library. This does not currently seem to be possible since only custom steps can be created in shared libraries.
Example jenkinsfile:
pipeline { agent any stages { stage('Build everywhere') { runOnAllPlatforms { sh 'doing build things' } } } }
Example shared library vars/runOnAllPlatforms.groovy:
def call(Closure body) { parallel { stage('RHEL') { agent { node { label 'rhel7' } } steps { body() } stage('Apple') { agent { node { label 'apple' } } steps { body() } steps { body() } } }
- duplicates
-
JENKINS-40986 Matrix structure for Declarative Pipeline
-
- Resolved
-
- is duplicated by
-
JENKINS-49984 Ability to factor out multiple stages into shared libraries
-
- Closed
-
[JENKINS-49662] Ability to create custom stages in parallel blocks in pipeline shared library
Component/s | New: pipeline-model-definition-plugin [ 21706 ] | |
Component/s | Original: pipeline [ 21692 ] |
Link |
New:
This issue is duplicated by |
Link |
New:
This issue duplicates |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
kevlan I'm getting the following error: ": Starting with version 0.5, steps in a stage must be in a steps block.
Any reason why? I'm reusing your example...
The error is the following: