Search in sources :

Example 31 with WorkflowMultiBranchProject

use of org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject in project blueocean-plugin by jenkinsci.

the class GithubPipelineCreateRequestTest method shouldFindUserStoreCredential.

@Test
public void shouldFindUserStoreCredential() throws IOException {
    // add username password credential to user's credential store in user domain and in USER scope
    User user = login();
    CredentialsStore store = null;
    for (CredentialsStore s : CredentialsProvider.lookupStores(user)) {
        if (s.hasPermission(CredentialsProvider.CREATE) && s.hasPermission(CredentialsProvider.UPDATE)) {
            store = s;
            break;
        }
    }
    assertNotNull(store);
    store.addDomain(new Domain("github-domain", "Github Domain to store personal access token", Collections.<DomainSpecification>singletonList(new BlueOceanDomainSpecification())));
    Domain domain = store.getDomainByName("github-domain");
    StandardUsernamePasswordCredentials credential = new UsernamePasswordCredentialsImpl(CredentialsScope.USER, "github", "Github Access Token", user.getId(), "12345");
    store.addCredentials(domain, credential);
    // create another credentials with same id in system store with different description
    for (CredentialsStore s : CredentialsProvider.lookupStores(Jenkins.getInstance())) {
        s.addCredentials(Domain.global(), new UsernamePasswordCredentialsImpl(CredentialsScope.USER, "github", "System Github Access Token", user.getId(), "12345"));
    }
    WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "demo");
    AbstractFolderProperty prop = new BlueOceanCredentialsProvider.FolderPropertyImpl(user.getId(), credential.getId(), BlueOceanCredentialsProvider.createDomain("https://api.github.com"));
    mp.addProperty(prop);
    // lookup for created credential id in system store, it should resolve to previously created user store credential
    StandardCredentials c = Connector.lookupScanCredentials((Item) mp, "https://api.github.com", credential.getId());
    assertEquals("Github Access Token", c.getDescription());
    assertNotNull(c);
    assertTrue(c instanceof StandardUsernamePasswordCredentials);
    StandardUsernamePasswordCredentials usernamePasswordCredentials = (StandardUsernamePasswordCredentials) c;
    assertEquals(credential.getId(), usernamePasswordCredentials.getId());
    assertEquals(credential.getPassword().getPlainText(), usernamePasswordCredentials.getPassword().getPlainText());
    assertEquals(credential.getUsername(), usernamePasswordCredentials.getUsername());
    // check the domain
    Domain d = CredentialsUtils.findDomain(credential.getId(), user);
    assertNotNull(d);
    assertTrue(d.test(new BlueOceanDomainRequirement()));
    // now remove this property
    mp.getProperties().remove(prop);
    // it must resolve to system credential
    c = Connector.lookupScanCredentials((Item) mp, null, credential.getId());
    assertEquals("System Github Access Token", c.getDescription());
}
Also used : User(hudson.model.User) BlueOceanDomainSpecification(io.jenkins.blueocean.rest.impl.pipeline.credential.BlueOceanDomainSpecification) UsernamePasswordCredentialsImpl(com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl) BlueOceanDomainSpecification(io.jenkins.blueocean.rest.impl.pipeline.credential.BlueOceanDomainSpecification) DomainSpecification(com.cloudbees.plugins.credentials.domains.DomainSpecification) AbstractFolderProperty(com.cloudbees.hudson.plugins.folder.AbstractFolderProperty) StandardUsernamePasswordCredentials(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials) WorkflowMultiBranchProject(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) Item(hudson.model.Item) BlueOceanDomainRequirement(io.jenkins.blueocean.rest.impl.pipeline.credential.BlueOceanDomainRequirement) CredentialsStore(com.cloudbees.plugins.credentials.CredentialsStore) Domain(com.cloudbees.plugins.credentials.domains.Domain) StandardCredentials(com.cloudbees.plugins.credentials.common.StandardCredentials) PipelineBaseTest(io.jenkins.blueocean.rest.impl.pipeline.PipelineBaseTest) Test(org.junit.Test)

Example 32 with WorkflowMultiBranchProject

use of org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject in project blueocean-plugin by jenkinsci.

the class BlueMessageEnricher method maybeEnrichMessage.

private void maybeEnrichMessage(@Nonnull Message message) {
    String channelName = message.getChannelName();
    if (channelName.equals(Events.JobChannel.NAME) && message instanceof JobChannelMessage) {
        JobChannelMessage jobChannelMessage = (JobChannelMessage) message;
        Item jobChannelItem = jobChannelMessage.getJobChannelItem();
        if (jobChannelItem == null) {
            return;
        }
        Link jobUrl = LinkResolver.resolveLink(jobChannelItem);
        if (jobUrl == null) {
            return;
        }
        BlueOrganization org = OrganizationFactory.getInstance().getContainingOrg(jobChannelItem);
        if (org != null) {
            message.set(EventProps.Jenkins.jenkins_org, org.getName());
        }
        jobChannelMessage.set(BlueEventProps.blueocean_job_rest_url, jobUrl.getHref());
        jobChannelMessage.set(BlueEventProps.blueocean_job_pipeline_name, AbstractPipelineImpl.getFullName(org, jobChannelItem));
        if (jobChannelItem instanceof WorkflowJob) {
            ItemGroup<? extends Item> parent = jobChannelItem.getParent();
            if (parent instanceof WorkflowMultiBranchProject) {
                String multiBranchProjectName = AbstractPipelineImpl.getFullName(org, (WorkflowMultiBranchProject) parent);
                jobChannelMessage.set(BlueEventProps.blueocean_job_pipeline_name, multiBranchProjectName);
                jobChannelMessage.set(BlueEventProps.blueocean_job_branch_name, jobChannelItem.getName());
            }
        }
        if (message.containsKey("job_run_queueId") && jobChannelItem instanceof hudson.model.Job) {
            String queueIdStr = message.get("job_run_queueId");
            if (queueIdStr == null) {
                return;
            }
            final long queueId = Long.parseLong(queueIdStr);
            Queue.Item queueItem = Jenkins.getInstance().getQueue().getItem(queueId);
            if (queueItem == null) {
                return;
            }
            hudson.model.Job job = (hudson.model.Job) jobChannelItem;
            BlueQueueItem blueQueueItem = QueueUtil.getQueuedItem(null, queueItem, job);
            if (blueQueueItem != null) {
                jobChannelMessage.set(BlueEventProps.blueocean_queue_item_expected_build_number, Integer.toString(blueQueueItem.getExpectedBuildNumber()));
            } else {
                // If build is already running, we simply take the run id and pass it on
                if (message.get("job_run_status") != null) {
                    String buildNumberStr = message.get("jenkins_object_id");
                    if (StringUtils.isNotBlank(buildNumberStr)) {
                        jobChannelMessage.set(BlueEventProps.blueocean_queue_item_expected_build_number, message.get("jenkins_object_id"));
                    }
                }
            }
        }
    }
}
Also used : JobChannelMessage(org.jenkinsci.plugins.pubsub.JobChannelMessage) BlueOrganization(io.jenkins.blueocean.rest.model.BlueOrganization) WorkflowMultiBranchProject(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) Item(hudson.model.Item) BlueQueueItem(io.jenkins.blueocean.rest.model.BlueQueueItem) WorkflowJob(org.jenkinsci.plugins.workflow.job.WorkflowJob) WorkflowJob(org.jenkinsci.plugins.workflow.job.WorkflowJob) Queue(hudson.model.Queue) BlueQueueItem(io.jenkins.blueocean.rest.model.BlueQueueItem) Link(io.jenkins.blueocean.rest.hal.Link)

Example 33 with WorkflowMultiBranchProject

use of org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject in project blueocean-plugin by jenkinsci.

the class SseEventTest method multiBranchJobEvents.

@Test
public void multiBranchJobEvents() throws Exception {
    setupScm();
    final OneShotEvent success = new OneShotEvent();
    // index: 0 QUEUED, index 1: ALLOCATED, index: 2 INDEXING, index: 3 COMPLETED
    final boolean[] mbpStatus = { false, false, false, false };
    // index: 0 created, index: 1 QUEUED, index 2: ALLOCATED, index: 3 RUNNING, index: 4 SUCCESS
    final boolean[] masterBranchStatus = { false, false, false, false, false };
    final boolean[] feature1BranchStatus = { false, false, false, false, false };
    final boolean[] masterBranchPipelineEvent = { false };
    final boolean[] feature1BranchPipelineEvent = { false };
    final boolean[] masterBranchNodeBlockEvent = { false };
    final boolean[] feature1BranchNodeBlockEvent = { false };
    final AssertionHelper assertionHelper = new AssertionHelper();
    SSEConnection con = new SSEConnection(j.getURL(), "me", new ChannelSubscriber() {

        @Override
        public void onMessage(@Nonnull Message message) {
            System.out.println(message);
            if ("job".equals(message.get(jenkins_channel))) {
                if ("org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject".equals(message.get(jenkins_object_type))) {
                    assertionHelper.isEquals("/blue/rest/organizations/jenkins/pipelines/pipeline1/", message.get(blueocean_job_rest_url));
                    // assertEquals("/blue/rest/organizations/jenkins/pipelines/pipeline1/", message.get(blueocean_job_rest_url));
                    assertionHelper.isEquals("pipeline1", message.get(blueocean_job_pipeline_name));
                    assertionHelper.isEquals("job", message.get(jenkins_channel));
                    assertionHelper.isEquals("jenkins", message.get(jenkins_org));
                    assertionHelper.isEquals("true", message.get(job_ismultibranch));
                    assertionHelper.isEquals("pipeline1", message.get(job_name));
                    assertionHelper.isNull(message.get(job_orgfolder_indexing_status));
                    assertionHelper.isNull(message.get(job_orgfolder_indexing_result));
                    if ("QUEUED".equals(message.get(job_run_status))) {
                        // queued
                        mbpStatus[0] = true;
                    }
                    if ("ALLOCATED".equals(message.get(job_run_status))) {
                        // allocated or left queue
                        mbpStatus[1] = true;
                    }
                    if ("INDEXING".equals(message.get(job_multibranch_indexing_status))) {
                        // indexing started
                        mbpStatus[2] = true;
                        assertionHelper.isNotNull(message.get(job_run_queueId));
                    }
                    if ("SUCCESS".equals(message.get(job_multibranch_indexing_result)) || ("COMPLETED".equals(message.get(job_multibranch_indexing_status)) && "job_run_queue_task_complete".equals(message.get(jenkins_event)))) {
                        // indexing completed
                        mbpStatus[3] = true;
                    }
                } else if ("org.jenkinsci.plugins.workflow.job.WorkflowJob".equals(message.get(jenkins_object_type))) {
                    assertionHelper.isEquals("pipeline1", message.get(blueocean_job_pipeline_name));
                    if ("pipeline1/master".equals(message.get(job_name))) {
                        System.out.println("job_run_status::::: " + message.get(job_run_status));
                        assertionHelper.isEquals("/blue/rest/organizations/jenkins/pipelines/pipeline1/branches/master/", message.get(blueocean_job_rest_url));
                        assertionHelper.isEquals("master", message.get(blueocean_job_branch_name));
                        if ("job_crud_created".equals(message.get(jenkins_event))) {
                            masterBranchStatus[0] = true;
                        }
                        if ("QUEUED".equals(message.get(job_run_status))) {
                            masterBranchStatus[1] = true;
                        } else if ("ALLOCATED".equals(message.get(job_run_status))) {
                            masterBranchStatus[2] = true;
                        } else if ("RUNNING".equals(message.get(job_run_status))) {
                            System.out.println("in master running.....");
                            assertionHelper.isEquals("1", message.get(blueocean_queue_item_expected_build_number));
                            masterBranchStatus[3] = true;
                        }
                        if ("SUCCESS".equals(message.get(job_run_status)) || "job_run_queue_task_complete".equals(message.get(jenkins_event))) {
                            masterBranchStatus[4] = true;
                        }
                    } else if ("pipeline1/feature%2Fux-1".equals(message.get(job_name))) {
                        assertionHelper.isEquals("/blue/rest/organizations/jenkins/pipelines/pipeline1/branches/feature%252Fux-1/", message.get(blueocean_job_rest_url));
                        assertionHelper.isEquals("feature%2Fux-1", message.get(blueocean_job_branch_name));
                        if ("job_crud_created".equals(message.get(jenkins_event))) {
                            feature1BranchStatus[0] = true;
                        }
                        System.out.println("job_run_status::::: " + message.get(job_run_status));
                        if ("QUEUED".equals(message.get(job_run_status))) {
                            feature1BranchStatus[1] = true;
                        } else if ("ALLOCATED".equals(message.get(job_run_status))) {
                            feature1BranchStatus[2] = true;
                        }
                        if ("SUCCESS".equals(message.get(job_run_status)) || "job_run_queue_task_complete".equals(message.get(jenkins_event))) {
                            feature1BranchStatus[4] = true;
                        }
                    }
                } else if ("org.jenkinsci.plugins.workflow.job.WorkflowRun".equals(message.get(jenkins_object_type))) {
                    if ("pipeline1/master".equals(message.get(job_name))) {
                        if ("RUNNING".equals(message.get(job_run_status))) {
                            assertionHelper.isEquals("1", message.get(blueocean_queue_item_expected_build_number));
                            masterBranchStatus[3] = true;
                        }
                    } else if ("pipeline1/feature%2Fux-1".equals(message.get(job_name))) {
                        if ("RUNNING".equals(message.get(job_run_status))) {
                            assertionHelper.isEquals("1", message.get(blueocean_queue_item_expected_build_number));
                            feature1BranchStatus[3] = true;
                        }
                    }
                }
                // all completed
                if (mbpStatus[3] && masterBranchStatus[4] && feature1BranchStatus[4]) {
                    success.signal();
                }
            } else if ("pipeline".equals(message.get(jenkins_channel))) {
                if ("pipeline1/master".equals(message.get(pipeline_job_name))) {
                    assertionHelper.isEquals("1", message.get(pipeline_run_id));
                    masterBranchPipelineEvent[0] = true;
                    if ("pipeline_step".equals(message.get(jenkins_event)) && "node".equals(message.get(pipeline_step_name))) {
                        masterBranchNodeBlockEvent[0] = true;
                    }
                } else if ("pipeline1/feature%2Fux-1".equals(message.get(pipeline_job_name))) {
                    feature1BranchPipelineEvent[0] = true;
                    assertionHelper.isEquals("1", message.get(pipeline_run_id));
                    if ("pipeline_step".equals(message.get(jenkins_event)) && "node".equals(message.get(pipeline_step_name))) {
                        feature1BranchNodeBlockEvent[0] = true;
                    }
                }
                if ("pipeline_stage".equals(message.get(jenkins_event))) {
                    assertionHelper.isNotNull(message.get(pipeline_step_stage_name));
                    assertionHelper.isEquals("build", message.get(pipeline_step_stage_name));
                    assertionHelper.isNotNull(message.get(pipeline_step_flownode_id));
                } else if ("pipeline_step".equals(message.get(jenkins_event))) {
                    assertionHelper.isNotNull(message.get(pipeline_step_flownode_id));
                    assertionHelper.isEquals("false", message.get(pipeline_step_is_paused));
                }
            }
        }
    });
    con.subscribe("pipeline");
    con.subscribe("job");
    final WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "pipeline1");
    mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false), new DefaultBranchPropertyStrategy(new BranchProperty[0])));
    for (SCMSource source : mp.getSCMSources()) {
        assertEquals(mp, source.getOwner());
    }
    mp.scheduleBuild2(0).getFuture().get();
    WorkflowJob p = mp.getItem("master");
    if (p == null) {
        mp.getIndexing().writeWholeLogTo(System.out);
        fail("master project not found");
    }
    j.waitUntilNoActivity();
    WorkflowRun b1 = p.getLastBuild();
    assertEquals(1, b1.getNumber());
    assertEquals(2, mp.getItems().size());
    success.block(5000);
    con.close();
    if (success.isSignaled()) {
        assertTrue(masterBranchPipelineEvent[0]);
        assertTrue(feature1BranchPipelineEvent[0]);
        assertTrue(masterBranchNodeBlockEvent[0]);
        assertTrue(feature1BranchNodeBlockEvent[0]);
        assertArrayEquals(mbpStatus, new boolean[] { true, true, true, true });
        assertArrayEquals(masterBranchStatus, new boolean[] { true, true, true, true, true });
        assertArrayEquals(feature1BranchStatus, new boolean[] { true, true, true, true, true });
    }
    if (assertionHelper.totalErrors() > 0) {
        fail("There were errors: " + assertionHelper.totalErrors());
    }
}
Also used : Message(org.jenkinsci.plugins.pubsub.Message) ChannelSubscriber(org.jenkinsci.plugins.pubsub.ChannelSubscriber) GitSCMSource(jenkins.plugins.git.GitSCMSource) SCMSource(jenkins.scm.api.SCMSource) GitSCMSource(jenkins.plugins.git.GitSCMSource) BranchSource(jenkins.branch.BranchSource) SSEConnection(io.jenkins.blueocean.events.sse.SSEConnection) WorkflowRun(org.jenkinsci.plugins.workflow.job.WorkflowRun) WorkflowMultiBranchProject(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) WorkflowJob(org.jenkinsci.plugins.workflow.job.WorkflowJob) DefaultBranchPropertyStrategy(jenkins.branch.DefaultBranchPropertyStrategy) OneShotEvent(hudson.util.OneShotEvent) Test(org.junit.Test)

Example 34 with WorkflowMultiBranchProject

use of org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject in project blueocean-plugin by jenkinsci.

the class BlueOceanWebURLBuilderTest method getMultiBranchPipelineInsideFolder.

@Test
public void getMultiBranchPipelineInsideFolder() throws Exception {
    MockFolder folder1 = jenkinsRule.createFolder("folder1");
    MockFolder folder2 = folder1.createProject(MockFolder.class, "folder two with spaces");
    WorkflowMultiBranchProject mp = folder2.createProject(WorkflowMultiBranchProject.class, "p");
    String blueOceanURL;
    blueOceanURL = urlMapper.getUrl(mp);
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/branches", blueOceanURL);
    mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false), new DefaultBranchPropertyStrategy(new BranchProperty[0])));
    for (SCMSource source : mp.getSCMSources()) {
        assertEquals(mp, source.getOwner());
    }
    mp.scheduleBuild2(0).getFuture().get();
    jenkinsRule.waitUntilNoActivity();
    // All branch jobs should just resolve back to the same top level branches
    // page for the multibranch job in Blue Ocean.
    WorkflowJob masterJob = findBranchProject(mp, "master");
    blueOceanURL = urlMapper.getUrl(masterJob);
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/branches", blueOceanURL);
    WorkflowJob featureUx1Job = findBranchProject(mp, "feature/ux-1");
    blueOceanURL = urlMapper.getUrl(featureUx1Job);
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/branches", blueOceanURL);
    WorkflowJob feature2Job = findBranchProject(mp, "feature2");
    blueOceanURL = urlMapper.getUrl(feature2Job);
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/branches", blueOceanURL);
    // Runs on the jobs
    blueOceanURL = urlMapper.getUrl(masterJob.getFirstBuild());
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/detail/master/1", blueOceanURL);
    blueOceanURL = urlMapper.getUrl(featureUx1Job.getFirstBuild());
    assertURL("blue/organizations/jenkins/folder1%2Ffolder%20two%20with%20spaces%2Fp/detail/feature%2Fux-1/1", blueOceanURL);
}
Also used : WorkflowMultiBranchProject(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) GitSCMSource(jenkins.plugins.git.GitSCMSource) SCMSource(jenkins.scm.api.SCMSource) GitSCMSource(jenkins.plugins.git.GitSCMSource) MockFolder(org.jvnet.hudson.test.MockFolder) BranchSource(jenkins.branch.BranchSource) WorkflowJob(org.jenkinsci.plugins.workflow.job.WorkflowJob) DefaultBranchPropertyStrategy(jenkins.branch.DefaultBranchPropertyStrategy) Test(org.junit.Test)

Example 35 with WorkflowMultiBranchProject

use of org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject in project blueocean-plugin by jenkinsci.

the class AbstractRunImplTest method replayRunTestMB.

// Disabled, see JENKINS-40084
@Test
@Ignore
public void replayRunTestMB() throws Exception {
    j.createOnlineSlave(Label.get("remote"));
    sampleRepo.write("Jenkinsfile", "node('remote') {\n" + "    ws {\n" + "       checkout scm\n" + "       stage 'build'\n " + "node {echo 'Building'}\n" + "       stage 'test'\nnode { echo 'Testing'}\n" + "       stage 'deploy'\nnode { echo 'Deploying'}\n" + "       }\n" + "   }");
    sampleRepo.git("add", "Jenkinsfile");
    sampleRepo.git("commit", "--message=init");
    WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
    mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false), new DefaultBranchPropertyStrategy(new BranchProperty[0])));
    for (SCMSource source : mp.getSCMSources()) {
        assertEquals(mp, source.getOwner());
    }
    mp.scheduleBuild2(0).getFuture().get();
    WorkflowJob job1 = mp.getItem("master");
    WorkflowRun b1 = job1.scheduleBuild2(0).waitForStart();
    j.waitForCompletion(b1);
    j.assertBuildStatusSuccess(b1);
    sampleRepo.write("file1", "");
    sampleRepo.git("add", "file1");
    sampleRepo.git("commit", "--message=init");
    WorkflowRun b2 = job1.scheduleBuild2(0).get();
    j.assertBuildStatusSuccess(b2);
    Assert.assertNotEquals(new PipelineRunImpl(b1, null, null).getCommitId(), new PipelineRunImpl(b2, null, null).getCommitId());
    Map replayBuild = request().post("/organizations/jenkins/pipelines/p/branches/master/runs/" + b1.getNumber() + "/replay").build(Map.class);
    Queue.Item item = j.getInstance().getQueue().getItem(Long.parseLong((String) replayBuild.get("id")));
    WorkflowRun replayedRun = (WorkflowRun) item.getFuture().get();
    Map r = request().get("/organizations/jenkins/pipelines/p/branches/master/runs/" + replayedRun.getNumber() + "/").build(Map.class);
    assertEquals(new PipelineRunImpl(b1, null, null).getCommitId(), r.get("commitId"));
}
Also used : WorkflowMultiBranchProject(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) GitSCMSource(jenkins.plugins.git.GitSCMSource) SCMSource(jenkins.scm.api.SCMSource) GitSCMSource(jenkins.plugins.git.GitSCMSource) BranchSource(jenkins.branch.BranchSource) WorkflowJob(org.jenkinsci.plugins.workflow.job.WorkflowJob) DefaultBranchPropertyStrategy(jenkins.branch.DefaultBranchPropertyStrategy) Map(java.util.Map) Queue(hudson.model.Queue) WorkflowRun(org.jenkinsci.plugins.workflow.job.WorkflowRun) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

WorkflowMultiBranchProject (org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject)44 Test (org.junit.Test)38 BranchSource (jenkins.branch.BranchSource)36 GitSCMSource (jenkins.plugins.git.GitSCMSource)36 SCMSource (jenkins.scm.api.SCMSource)32 DefaultBranchPropertyStrategy (jenkins.branch.DefaultBranchPropertyStrategy)31 Map (java.util.Map)28 ImmutableMap (com.google.common.collect.ImmutableMap)26 WorkflowJob (org.jenkinsci.plugins.workflow.job.WorkflowJob)26 List (java.util.List)16 ImmutableList (com.google.common.collect.ImmutableList)15 ArrayList (java.util.ArrayList)13 WorkflowRun (org.jenkinsci.plugins.workflow.job.WorkflowRun)12 User (hudson.model.User)7 Queue (hudson.model.Queue)5 MockFolder (org.jvnet.hudson.test.MockFolder)5 FreeStyleProject (hudson.model.FreeStyleProject)3 Item (hudson.model.Item)3 RunList (hudson.util.RunList)3 Domain (com.cloudbees.plugins.credentials.domains.Domain)2