Class BuildUtil
java.lang.Object
au.com.centrumsystems.hudson.plugin.util.BuildUtil
Provides helper methods for #hudson.model.AbstractBuild
- Author:
- Centrum Systems
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActiongetAllBuildParametersAction(AbstractBuild<?, ?> upstreamBuild, AbstractProject<?, ?> downstreamProject) Given an Upstream AbstractBuild and a Downstream AbstractProject will retrieve the associated ParametersAction.static ParametersActiongetBuildParametersAction(AbstractBuild<?, ?> build) Gets the ParametersAction of an AbstractBuildstatic AbstractBuild<?,?> getDownstreamBuild(AbstractProject<?, ?> downstreamProject, AbstractBuild<?, ?> upstreamBuild) Gets the next downstream build based on the upstream build and downstream project.getUnsensitiveParameters(AbstractBuild<?, ?> build) Retrieve build parameters in String format without sensitive parameters (passwords, ...)static ParametersActionmergeParameters(ParametersAction base, ParametersAction overlay) Merges two sets of ParametersAction
-
Constructor Details
-
BuildUtil
public BuildUtil()
-
-
Method Details
-
getDownstreamBuild
public static AbstractBuild<?,?> getDownstreamBuild(AbstractProject<?, ?> downstreamProject, AbstractBuild<?, ?> upstreamBuild) Gets the next downstream build based on the upstream build and downstream project.- Parameters:
downstreamProject- - The downstream projectupstreamBuild- - The upstream build- Returns:
- - The next downstream build based on the upstream build and downstream project, or null if there is no downstream project.
-
getAllBuildParametersAction
public static Action getAllBuildParametersAction(AbstractBuild<?, ?> upstreamBuild, AbstractProject<?, ?> downstreamProject) Given an Upstream AbstractBuild and a Downstream AbstractProject will retrieve the associated ParametersAction. This will result in parameters from the upstream build not overriding parameters on the downstream project.- Parameters:
upstreamBuild- - The AbstractBuilddownstreamProject- - The AbstractProject- Returns:
- - AbstractBuild's ParametersAction
-
getBuildParametersAction
Gets the ParametersAction of an AbstractBuild- Parameters:
build- - AbstractBuild- Returns:
- - ParametersAction of AbstractBuild
-
mergeParameters
Merges two sets of ParametersAction- Parameters:
base- ParametersAction set 1overlay- ParametersAction set 2- Returns:
- - Single set of ParametersAction
-
getUnsensitiveParameters
Retrieve build parameters in String format without sensitive parameters (passwords, ...)- Parameters:
build- the build we retrieve the parameters from- Returns:
- a map of parameters names and values
-