Examples of scheduleBuild2()


Examples of hudson.model.FreeStyleProject.scheduleBuild2()

            project.getBuildersList().add(new BatchFile("echo hello"));
        } else {
            project.getBuildersList().add(new Shell("echo hello"));
        }

        FreeStyleBuild build = project.scheduleBuild2(0).get();
        System.out.println(build.getDisplayName()+" completed");

        String s = FileUtils.readFileToString(build.getLogFile());
        assertTrue(s,s.contains("echo hello"));
    }
View Full Code Here

Examples of hudson.model.FreeStyleProject.scheduleBuild2()

    project.setScm(new ExtractResourceSCM(getClass().getResource(
        "/simple-projects.zip")));

    // test the regular slave - variable not expanded
    project.setAssignedLabel(slaveRegular.getSelfLabel());
    FreeStyleBuild build = project.scheduleBuild2(0).get();
    System.out.println(build.getDisplayName() + " completed");

    assertBuildStatusSuccess(build);

    String buildLogRegular = getBuildLog(build);
View Full Code Here

Examples of hudson.model.Project.scheduleBuild2()

       
        DescribableList wrappers = p.getBuildWrappersList();
        JenkowBuildWrapper wrapper = new JenkowBuildWrapper();
        if (!wrappers.contains(wrapper.getDescriptor())) wrappers.add(wrapper);
       
        p.scheduleBuild2(jenkins.getQuietPeriod(),new WorkflowCause("triggered by workflow"),ja);
        return;
      }
    }
   
    // TODO 9: need test for Jenkins task with empty / non-existing job name
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.job.WorkflowJob.scheduleBuild2()

                "def x = input message:'Do you want chocolate?', id:'Icecream', ok: 'Purchase icecream', parameters: [new BooleanParameterDefinition('chocolate',false,'Favorite icecream flavor')];",
                "echo(\"after: ${x}\");"),"\n")));


        // get the build going, and wait until workflow pauses
        QueueTaskFuture<WorkflowRun> q = foo.scheduleBuild2(0);
        WorkflowRun b = q.getStartCondition().get();
        CpsFlowExecution e = (CpsFlowExecution) b.getExecutionPromise().get();

        while (b.getAction(InputAction.class)==null) {
            e.waitForSuspension();
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.