Jenkins multi-branch pipeline and specifying upstream projects

前端 未结 2 796
無奈伤痛
無奈伤痛 2021-01-02 16:19

We currently generate a lot of Jenkins jobs on a per Git branch basis using Jenkins job DSL; the multi-branch pipeline plugin looks like an interesting way to potentially ge

2条回答
  •  悲&欢浪女
    2021-01-02 16:58

    I'm currently trying to get this to work for our deployment. The closest I've got is adding the following to the downstream Jenkinsfile;

    properties([
        pipelineTriggers([
            triggers: [
                [
                    $class: 'jenkins.triggers.ReverseBuildTrigger',
                    upstreamProjects: "some_project", result: hudson.model.Result.SUCCESS
                ]
            ]
        ]),
    ])
    

    That at least gets Jenkins to acknowledge that it should be triggering when 'some_project' get's built i.e it appears in the "View Configuration" page.

    However so far builds of 'some_project' still don't trigger the downstream project as expected.

    That being said maybe you'll have more luck. Let me know if it works for you.

    (Someone else has asked a similar question here -> Jenkins: Trigger Multi-branch pipeline on upstream change )

提交回复
热议问题