Examples of EnvironmentAction


Examples of org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction

     */
    @Override public final <T> T get(Class<T> key) throws IOException, InterruptedException {
        T value = doGet(key);
        if (key == EnvVars.class) {
            Run<?,?> run = get(Run.class);
            EnvironmentAction a = run.getAction(EnvironmentAction.class);
            EnvVars env = a != null ? a.getEnvironment() : getEnvironment(run, get(TaskListener.class));
            if (value != null) {
                env = new EnvVars(env);
                env.putAll((EnvVars) value); // context overrides take precedence over user settings
            }
            return key.cast(env);
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction

                FileUtils.write(new File(jenkins().getRootDir(), "touch"), "here");
                watchDescriptor.watchUpdate();
                waitForWorkflowToComplete();
                assertBuildCompletedSuccessfully();
                story.j.assertLogContains("tag3=custom2 stuff=more", b);
                EnvironmentAction a = b.getAction(EnvironmentAction.class);
                assertNotNull(a);
                assertEquals("custom2", a.getEnvironment().get("BUILD_TAG"));
                assertEquals("more", a.getEnvironment().get("STUFF"));
            }
        });
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.