Search in sources :

Example 1 with MessageException

use of org.jenkinsci.plugins.pubsub.MessageException in project blueocean-plugin by jenkinsci.

the class AbstractMultiBranchCreateRequest method _sendMultibranchIndexingCompleteEvent.

private void _sendMultibranchIndexingCompleteEvent(MultiBranchProject mbp, int iterations) {
    try {
        SimpleMessage msg = new SimpleMessage();
        msg.set("jenkins_object_type", "org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject");
        msg.set("job_run_status", "ALLOCATED");
        msg.set("job_name", mbp.getName());
        msg.set("jenkins_org", "jenkins");
        msg.set("job_orgfolder_indexing_status", "COMPLETE");
        msg.set("job_run_queueId", "1");
        msg.set("jenkins_object_name", mbp.getName());
        msg.set("blueocean_job_rest_url", "/blue/rest/organizations/jenkins/pipelines/" + mbp.getName() + "/");
        msg.set("jenkins_event", "job_run_queue_task_complete");
        msg.set("job_multibranch_indexing_result", "SUCCESS");
        msg.set("blueocean_job_pipeline_name", mbp.getName());
        msg.set("jenkins_object_url", "job/" + mbp.getName() + "/");
        msg.set("jenkins_channel", "job");
        msg.set("jenkinsfile_present", "false");
        PubsubBus.getBus().publish(msg);
    } catch (MessageException e) {
        throw new RuntimeException(e);
    }
}
Also used : MessageException(org.jenkinsci.plugins.pubsub.MessageException) SimpleMessage(org.jenkinsci.plugins.pubsub.SimpleMessage)

Aggregations

MessageException (org.jenkinsci.plugins.pubsub.MessageException)1 SimpleMessage (org.jenkinsci.plugins.pubsub.SimpleMessage)1