Copying artifacts from multiple upstream jobs at join in Jenkins

后端 未结 2 898
死守一世寂寞
死守一世寂寞 2020-12-20 18:48

Is it possible to have a Jenkins Job with has been triggered by the Join plugin copy artifacts from multiple upstream jobs?

I\'m trying to set-up a Jenkins configurat

相关标签:
2条回答
  • 2020-12-20 19:19

    If your builds are parameterized with a unique parameter for each run of the join-diamond, you can use that parameter in the CopyArtifact plugin to determine which build to copy from. You would want to specify "Latest successful build" and qualify it with the parameter and value.

    We have a similar situation where I work; multiple simultaneous runs of a join-diamond. The parameter in the build allows the downstream jobs to get the correct artifacts from the upstream jobs.

    0 讨论(0)
  • 2020-12-20 19:22

    Step by Step settings of the provided solution from Jason Swager:

    Project dependencies: diamond->fork->diamond_ready

    Project "fork": String parameter "UNIQUE_ID" (only dummy not used inside) (Creates an artifcat and Archive the artifacts)

    Project "diamond_ready" String parameter: UNIQUE_ID Copy artifacts from another project Project name: fork Parameter filters: UNIQUE_ID=${UNIQUE_ID}

    Project "diamond": Trigger parameterized build on other project Projects to build: fork Predefinded parameters: UNIQUE_ID=${BUILD_TAG} Join Trigger: Post-Join Actions: Trigger parameterized build on other projects Projects to build: diamond_ready Predefined Generator parameters: UNIQUE_ID=${BUILD_TAG}

    0 讨论(0)
提交回复
热议问题