How to copy artifacts from upstream project in Jenkins?

Joey Yi Zhao

I have two upstream projects(Pro1, Pro2). Both of the upstream projects archive artifacts. I want to create one downstream projects to copy artifacts from the upstream project who trigger the downstream project.

For example, if the downstream is triggered by Pro1, then it will copy the artifacts from Pro1 not Pro2. In Jenkins, I can configure a project to copy artifacts from other projects but I have to specify the other project name. How can I specify a runtime project name in this case?

Suresh

This is one way of implementation approach for your required scenario,

Pass Upstream Job name to Downstream Job as input parameter.

Use Conditional BuildStep Plugin to check which Job triggered the downstream using the Job name input parameter. By using this add conditional statement to check and copy the artifacts from respective Job.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to copy the artifacts from slave to Jenkins workspace?

How to Copy Artifacts from other Jenkins Job from a Pipeline?

Copy artifacts from an upstream multi-branch pipeline

Jenkins : Copy artifacts from Multibranch pipeline

How to parameterize selector for copy artifacts in Jenkins pipeline

How to copy subdirectories artifacts by jenkins Copy Artifact Plugin

How can I use the Jenkins Copy Artifacts Plugin from within the pipelines (jenkinsfile)?

Jenkins Project Artifacts and Workspace

how to get upstream project info on a downstream project - Jenkins

Jenkins - how to copy test logs back to artifacts directory for build

Got "Failed to copy artifacts from another project with filter: **/*.war" while copying the war file from another project

How do you add packages from upstream sources in an Artifacts feed in Visual Studio?

Jenkins - How can i pass parameters from the Upstream to Downstream

How can I copy artifacts from executed jobs with declarative pipeline?

How to copy artifacts from NPM build to .NET Core deploy in TSFS

S3 Copy artifacts with Jenkins pipeline

Reuse artifacts at a later stage in the same Jenkins project

Gradle Artifactory Plugin - How to publish artifacts from multiple modules in a project?

How to add timestamp for artifacts in Jenkins

Copy jenkins pipeline project

copy all artifacts in a project to a new folder and create a module from them in IBM RDNG

Azure Devops Artifacts: disable saving packages from upstream sources

How do I remove all upstream packages in DevOps artifacts?

Get data from upstream job in Jenkins pipeline?

Downloading artifacts from Jenkins using wget or curl

Upload Build artifacts from Jenkins Pipeline to Sharepoint

Not able to deploy artifacts to Nexus repository from Jenkins

Copy artifacts from specific promoted build

Maven project is not able to download artifacts from Azure Artifacts