forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.artifacts.yml
36 lines (33 loc) · 1.63 KB
/
azure-pipelines.artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
parameters:
artifact: ''
buildId: ''
buildReason: ''
# Download and extract build artifacts
steps:
- script: |
echo "Artifact Name: ${{ parameters.artifact }}"
echo "Build ID / Run ID: ${{ parameters.buildId }}"
echo "Build Reason: ${{ parameters.buildReason }}"
displayName: echo some variables
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific' # Options: current, specific
project: cd9e4e13-b8db-429a-9c21-499bf1c98639
pipeline: 84
#preferTriggeringPipeline: false # Optional
runVersion: 'specific' # Required when source == Specific# Options: latest, latestFromBranch, specific
#runBranch: 'refs/heads/master' # Required when source == Specific && RunVersion == LatestFromBranch
runId: ${{ parameters.buildId }}
#tags: # Optional
artifact: ${{ parameters.artifact }}
#patterns: '**' # Optional
path: '$(Pipeline.Workspace)/a/${{ parameters.artifact }}'
- task: ExtractFiles@1
inputs:
# By default, input patterns start in the root folder of the repo (same as if you had specified $(Build.SourcesDirectory)).
# It'd be nice to use path variables here, but this task's inputs use relative pathing.
# Artifacts are downloaded by named directories into $(Pipeline.Workspace) by default, which is one directory up.
archiveFilePatterns: '$(Pipeline.Workspace)/a/${{ parameters.artifact }}/*.tar.gz'
# Extract into $(Pipeline.Workspace). Archive should include root folder so that contents get extracted into proper subdirectories.
destinationFolder: '$(Pipeline.Workspace)'
cleanDestinationFolder: false