JenkinsDownloadArtifacts@1 - Jenkins download artifacts v1 task

Use this task to download artifacts produced by a Jenkins job.

Syntax

# Jenkins download artifacts v1
# Download artifacts produced by a Jenkins job.
- task: JenkinsDownloadArtifacts@1
  inputs:
    jenkinsServerConnection: # string. Alias: serverEndpoint. Required. Jenkins service connection. 
    jobName: # string. Required. Job name. 
    #jenkinsJobType: # string. Optional. Use when jobName = invalidjobName. Jenkins job type. 
    saveTo: 'jenkinsArtifacts' # string. Required. Save to. Default: jenkinsArtifacts.
  # Advanced
    jenkinsBuild: 'LastSuccessfulBuild' # 'LastSuccessfulBuild' | 'BuildNumber'. Required. Download artifacts produced by. Default: LastSuccessfulBuild.
    #jenkinsBuildNumber: '1' # string. Required when jenkinsBuild == BuildNumber. Jenkins build number. Default: 1.
    #itemPattern: '**' # string. Item Pattern. Default: **.
    #downloadCommitsAndWorkItems: false # boolean. Download Commits and WorkItems. Default: false.
    #startJenkinsBuildNumber: # string. Optional. Use when downloadCommitsAndWorkItems == true && jenkinsBuild == BuildNumber. Download commits and work items from. 
    #artifactDetailsFileNameSuffix: # string. Optional. Use when downloadCommitsAndWorkItems == invalid. Commit and WorkItem FileName. 
  # Propagated Artifacts
    #propagatedArtifacts: false # boolean. Artifacts are propagated to Azure. Default: false.
    #artifactProvider: 'azureStorage' # 'azureStorage'. Required when propagatedArtifacts == notValid. Artifact Provider. Default: azureStorage.
    #ConnectedServiceNameARM: # string. Required when propagatedArtifacts == true. Azure Subscription. 
    #storageAccountName: # string. Required when propagatedArtifacts == true. Storage Account Name. 
    #containerName: # string. Required when propagatedArtifacts == true. Container Name. 
    #commonVirtualPath: # string. Optional. Use when propagatedArtifacts == true. Common Virtual Path.
# Jenkins Download Artifacts v1
# Download artifacts produced by a Jenkins job.
- task: JenkinsDownloadArtifacts@1
  inputs:
    jenkinsServerConnection: # string. Alias: serverEndpoint. Required. Jenkins service connection. 
    jobName: # string. Required. Job name. 
    #jenkinsJobType: # string. Optional. Use when jobName = invalidjobName. Jenkins job type. 
    saveTo: 'jenkinsArtifacts' # string. Required. Save to. Default: jenkinsArtifacts.
  # Advanced
    jenkinsBuild: 'LastSuccessfulBuild' # 'LastSuccessfulBuild' | 'BuildNumber'. Required. Download artifacts produced by. Default: LastSuccessfulBuild.
    #jenkinsBuildNumber: '1' # string. Required when jenkinsBuild == BuildNumber. Jenkins build number. Default: 1.
    #itemPattern: '**' # string. Item Pattern. Default: **.
    #downloadCommitsAndWorkItems: false # boolean. Download Commits and WorkItems. Default: false.
    #startJenkinsBuildNumber: # string. Optional. Use when downloadCommitsAndWorkItems == true && jenkinsBuild == BuildNumber. Download commits and work items from. 
    #artifactDetailsFileNameSuffix: # string. Optional. Use when downloadCommitsAndWorkItems == invalid. Commit and WorkItem FileName. 
  # Propagated Artifacts
    #propagatedArtifacts: false # boolean. Artifacts are propagated to Azure. Default: false.
    #artifactProvider: 'azureStorage' # 'azureStorage'. Required when propagatedArtifacts == notValid. Artifact Provider. Default: azureStorage.
    #ConnectedServiceNameARM: # string. Required when propagatedArtifacts == true. Azure Subscription. 
    #storageAccountName: # string. Required when propagatedArtifacts == true. Storage Account Name. 
    #containerName: # string. Required when propagatedArtifacts == true. Container Name. 
    #commonVirtualPath: # string. Optional. Use when propagatedArtifacts == true. Common Virtual Path.

Inputs

jenkinsServerConnection - Jenkins service connection
Input alias: serverEndpoint. string. Required.

Specifies the service connection for your Jenkins instance. To create a new service connection, click the Manage link.


jobName - Job name
string. Required.

Specifies the name of the Jenkins job to download artifacts from. This must exactly match the job name on the Jenkins server.


jenkinsJobType - Jenkins job type
string. Optional. Use when jobName = invalidjobName.

Automatically specifies the Jenkins job type.


saveTo - Save to
string. Required. Default value: jenkinsArtifacts.

Specifies the directory where Jenkins artifacts are downloaded and saved. This directory is created if it does not exist.


jenkinsBuild - Download artifacts produced by
string. Required. Allowed values: LastSuccessfulBuild (Last Successful Build), BuildNumber (Build Number). Default value: LastSuccessfulBuild.

Downloads artifacts produced by the last successful build or from a specific build instance.


jenkinsBuildNumber - Jenkins build number
string. Required when jenkinsBuild == BuildNumber. Default value: 1.

Downloads artifacts produced by this build.


itemPattern - Item Pattern
string. Default value: **.

Specifies the files to be downloaded as a multi-line minimatch pattern. More Information about file matching patterns.

The default pattern ** downloads all files across all artifacts produced by the Jenkins job. To download all files within the artifact drop, use drop/**.


downloadCommitsAndWorkItems - Download Commits and WorkItems
boolean. Default value: false.

Enables downloading the commits and work item details associated with the Jenkins Job.


startJenkinsBuildNumber - Download commits and work items from
string. Optional. Use when downloadCommitsAndWorkItems == true && jenkinsBuild == BuildNumber.

Starts the build number for downloading commits and work items. If provided, all commits and work items between the start build number and the build number given as input to download artifacts are downloaded.


artifactDetailsFileNameSuffix - Commit and WorkItem FileName
string. Optional. Use when downloadCommitsAndWorkItems == invalid.

Specifies the file name suffix for commits and work item attachments. Attachments are created with commits_{suffix}.json and workitem_{suffix}.json. If this input is not provided, attachments are created with the names commits.json and workitems.json.


propagatedArtifacts - Artifacts are propagated to Azure
boolean. Default value: false.

Use this input if Jenkins artifacts were propagated to Azure. To upload Jenkins artifacts to Azure, refer to this Jenkins plugin.


artifactProvider - Artifact Provider
string. Required when propagatedArtifacts == notValid. Allowed values: azureStorage (Azure Storage). Default value: azureStorage.

Specifies the external storage provider used in Jenkins job to upload the artifacts.


ConnectedServiceNameARM - Azure Subscription
string. Required when propagatedArtifacts == true.

Specifies the Azure Resource Manager subscription for the artifacts.


storageAccountName - Storage Account Name
string. Required when propagatedArtifacts == true.

Specifies Azure Classic or Resource Manager storage accounts. Select the storage account name where the artifacts are propagated.


containerName - Container Name
string. Required when propagatedArtifacts == true.

Specifies the name of the container in the storage account where artifacts are uploaded.


commonVirtualPath - Common Virtual Path
string. Optional. Use when propagatedArtifacts == true.

Specifies the path to the artifacts inside the Azure storage container.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to download artifacts produced by a Jenkins job.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.144.0 or greater
Task category Utility
Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Utility