public class BuildConfigurationParser extends Object
Constructor and Description |
---|
BuildConfigurationParser() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
parseConfigurations(Run<?,?> run)
Extract the configuration values from a
MatrixProject run (https://plugins.jenkins.io/matrix-project/). |
@Nonnull public static Map<String,String> parseConfigurations(@Nonnull Run<?,?> run)
MatrixProject
run (https://plugins.jenkins.io/matrix-project/).
It is possible to create a "Multi-configuration" project in Jenkins.
For these projects a matrix of build parameters can be configured.
When such project is triggered, a separate build is started for each configuration matrix cell (that is, each combination of parameters).
Configuration matrix parameters used for a specific build are available in the full name of the build's parent (an instance of MatrixConfiguration
),
for example: Jenkins job name: jobName/KEY1=VALUE1,KEY2=VALUE2
.
This method helps to parse these configuration parameters to a map.
If the run is not a matrix project execution, an empty map is returned.
Copyright © 2016–2024. All rights reserved.