How to pass build artifact into another job in Jenkins

后端 未结 2 1025
北海茫月
北海茫月 2021-01-01 11:27

Setup

I have two jobs in Jenkins:

  • build master - this builds the code and creates an artifact
  • deploy master - this
相关标签:
2条回答
  • 2021-01-01 11:47

    There is just one workspace per project/job in Jenkins. The directories of builds contain just information about the builds and their results.

    The root directories of both are specified in Manage JenkinsConfigure SystemAdvanced....

    To deploy an artifact of a previous build you have to copy it to somewhere else in build master and access it there from deploy master later.

    UPDATE:

    See the inline help for Which buildParameter Name:

    A parameter with this name should be added in the build parameters section above. There is a special parameter type for choosing the build selector.

    Use this Build selector for Copy Artifact instead of a String Parameter.

    0 讨论(0)
  • 2021-01-01 11:59

    Add following in downstream project. "Build selector for Copy Artifact" instead of a "String Parameter"

    Copy artifacts from another project

    Thats it. Click "Build with Parameters" and pass build number

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