The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
copyArtifacts
: Copy artifacts from another projectprojectName : String
The name of the project to copy artifacts from.
Artifacts from all modules will be copied. Enter JOBNAME/MODULENAME here to copy from a particular module; you may copy/paste this from the URL for that module when browsing Jenkins.
Example: MyMavenJob/my.group$MyModule
Artifacts from all configurations will be copied, each into a subdirectory with the name of the configuration as seen in its URL when browsing Jenkins.
Example: If the target directory is given as fromMatrix then the copy could create $WORKSPACE/fromMatrix/label=agentA/dist/mybuild.jar and $WORKSPACE/fromMatrix/label=agentB/dist/mybuild.jar.
To copy from a particular configuration, enter JOBNAME/AXIS=VALUE,.. as seen in the URL for that configuration.
Example: MyMatrixJob/jdk=Java6u17
To copy artifacts from one matrix project to another, use a parameter to select the matching configuration in the source project.
Example: OtherMatrixJob/jdk=$jdk
Use a path consisting of the project name followed by the branch name.
Example: /MyMultibranchProject/MyBranch
Special letters like '/' in branch names should be escaped. You can see the exact name in "Full project name" in job pages of each branch.
Example: ../MyMultibranchProject/feature%2Fnavigation
See "How to reference another project by name" for more information.
excludes : String
(optional)
filter : String
(optional)
fingerprintArtifacts : boolean
(optional)
flatten : boolean
(optional)
includeBuildNumberInTargetPath : boolean
(optional)
When true, the build number of the source project will be included in the target path. This is particularly useful when the selector is specific and the value is a permalink, e.g. lastSuccessfulBuild.
optional : boolean
(optional)
parameters : String
(optional)
Jobs may be filtered to select only builds matching particular parameters or other build variables. Use PARAM=VALUE,... to list the parameter filter; this is the same syntax as described for multiconfiguration jobs in Project name except with parameters instead of axis values. For example, FOO=bar,BAZ=true examines only builds that ran with parameter FOO set to bar and the checkbox for BAZ was checked.
You shouldn't use "Build selector for Copy Artifact" parameters here, as it doesn't preserve compatibility when you upgrade plugins, and doesn't work for builds built before upgrading.
resultVariableSuffix : String
(optional)
If not specified, the source project name will be used instead (in all uppercase, and sequences of characters other than A-Z replaced by a single underscore).
Example:
Source project name | Suffix to be used |
---|---|
Project-ABC | PROJECT_ABC |
tool1-release1.2 | TOOL_RELEASE_ |
selector
(optional)
downstream
upstreamProjectName : String
Copy artifacts from a build that is a downstream of a build of the specified project. You can use variable expressions.
Downstream builds are found using fingerprints of files. That is, a build that is triggered from a build isn't always considered downstream, but you need to fingerprint files used in builds to let Jenkins track them.
Note: "Downstream build of" is applicable only to AbstractProject based projects (both upstream and downstream projects).
upstreamBuildNumber : String
lastWithArtifacts
lastCompleted
$class: 'MultiJobBuildSelector'
buildParameter
parameterName : String
You can pass not only the parameter name, but also the parameter value itself. This is useful especially used with workflow-plugin.
permalink
id : String
$class: 'PromotedBuildSelector'
level : int
latestSavedBuild
specific
buildNumber : String
lastSuccessful
stable : boolean
(optional)
upstream
allowUpstreamDependencies : boolean
(optional)
fallbackToLastSuccessful : boolean
(optional)
upstreamFilterStrategy
(optional)
UseGlobalSetting
, UseOldest
, UseNewest
workspace
target : String
(optional)
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.