Jenkins: Trigger Multi-branch pipeline on upstream change

后端 未结 3 2059
离开以前
离开以前 2020-12-13 00:51

I am currently testing the pipeline approach of Jenkins 2.0 to see if it works for the build environment I am using.

First about the environment itself. It currently

3条回答
  •  别那么骄傲
    2020-12-13 01:10

    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", threshold: 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 Jenkins multi-branch pipeline and specifying upstream projects )

提交回复
热议问题