Class BuildConfigurationParser


  • public class BuildConfigurationParser
    extends Object
    • Constructor Detail

      • BuildConfigurationParser

        public BuildConfigurationParser()
    • Method Detail

      • parseConfigurations

        @Nonnull
        public static Map<String,​String> parseConfigurations​(@Nonnull
                                                                   Run<?,​?> run)
        Extract the configuration values from a 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.