Class EnvInjectRunHelper
java.lang.Object
com.tikal.jenkins.plugins.multijob.EnvInjectRunHelper
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class EnvInjectRunHelper
extends Object
This method contains abstraction layers for methods, which are available only in
AbstractBuild
.- Author:
- Oleg Nenashev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
getBuildVariables
(Run<?, ?> run, EnvVars result) Gets build variables.getBuildVariables
(Run<?, ?> run, org.jenkinsci.lib.envinject.EnvInjectLogger logger) getEnvVarsPreviousSteps
(Run<?, ?> build, org.jenkinsci.lib.envinject.EnvInjectLogger logger) static void
getJDKVariables
(Run<?, ?> run, TaskListener logger, EnvVars result) Gets JDK variables.getJenkinsSystemEnvVars
(boolean forceOnMaster)
-
Constructor Details
-
EnvInjectRunHelper
public EnvInjectRunHelper()
-
-
Method Details
-
getBuildVariables
Gets build variables. ForAbstractBuild
it invokes the standard method, for other types it relies onParametersAction
only.- Parameters:
run
- Runresult
- Target collection, where the variables will be added
-
getJDKVariables
public static void getJDKVariables(@NonNull Run<?, ?> run, TaskListener logger, EnvVars result) throws IOException, InterruptedExceptionGets JDK variables. ForAbstractBuild
it invokes operation on the node to retrieve the data; for other types it does nothing.- Parameters:
run
- Runlogger
- Loggerresult
- Target collection, where the variables will be added- Throws:
IOException
- Operation failureInterruptedException
- Operation has been interrupted
-
getBuildVariables
public static Map<String,String> getBuildVariables(@NonNull Run<?, ?> run, @NonNull org.jenkinsci.lib.envinject.EnvInjectLogger logger) throws org.jenkinsci.lib.envinject.EnvInjectException- Throws:
org.jenkinsci.lib.envinject.EnvInjectException
-
getEnvVarsPreviousSteps
@NonNull public static Map<String,String> getEnvVarsPreviousSteps(@NonNull Run<?, ?> build, @NonNull org.jenkinsci.lib.envinject.EnvInjectLogger logger) throws IOException, InterruptedException, org.jenkinsci.lib.envinject.EnvInjectException- Throws:
IOException
InterruptedException
org.jenkinsci.lib.envinject.EnvInjectException
-
getJenkinsSystemEnvVars
@NonNull public static Map<String,String> getJenkinsSystemEnvVars(boolean forceOnMaster) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-