forked from madhurivadaligithub/Envkalyan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCurrentPipelineArtifact.yml
133 lines (122 loc) · 4.13 KB
/
CurrentPipelineArtifact.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#trigger: none
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build job
pool: Hosted
steps:
- script: echo Hello, world! This is CI job
displayName: 'Run a one-line script'
- task: PublishPipelineArtifact@0
displayName: Create Artifact
inputs:
artifactName: Artifact1
targetPath: BVT\testFolder
- upload: BVT\Extension
artifact: Extension
- stage: QA
displayName: QA stage
jobs:
- job: NoArtifactJob
pool: Hosted
steps:
- powershell: ls $(Pipeline.Workspace) -r #Check the content of the workspace directory
- job: DownloadAllArtifactJob
pool: Hosted
steps:
- download: current
- powershell: |
ls $(Pipeline.Workspace)/
ls $(Pipeline.Workspace)/Artifact1
ls $(Pipeline.Workspace)/Artifact1/a.txt
ls $(Pipeline.Workspace)/Extension/
ls $(Pipeline.Workspace)/Extension/Extension.txt
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact1 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
displayName: Scorch workspace
- job: DownloadParticularArtifactJob
pool: Hosted
steps:
- download: current
artifact: Artifact1
- powershell: |
ls $(Pipeline.Workspace)/
ls $(Pipeline.Workspace)/Artifact1
ls $(Pipeline.Workspace)/Artifact1/a.txt
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact1 -Recurse -Force
displayName: Scorch workspace
- job: HonorDefaultProperties
pool: Hosted
steps:
- download: current
enabled: false
- powershell: ls $(Pipeline.Workspace) -r #Check the content of the workspace directory
- stage: Deploy
displayName: Deploy stage
jobs:
- deployment: Deploy1
displayName: Download All Artifacts
pool: hosted
environment: env_1_19
strategy:
runOnce:
deploy:
steps:
- powershell: |
ls $(Pipeline.Workspace)/Artifact1
ls $(Pipeline.Workspace)/Artifact1/a.txt
ls $(Pipeline.Workspace)/Extension/
ls $(Pipeline.Workspace)/Extension/Extension.txt
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact1 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
displayName: Scorch workspace
- deployment: Deploy2
displayName: Download mentioned Artifacts
pool: hosted
environment: env_1_19
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: Extension
- powershell: |
ls $(Pipeline.Workspace)/Extension/
ls $(Pipeline.Workspace)/Extension/Extension.txt
ls $(Pipeline.Workspace)/Extension/zip
ls $(Pipeline.Workspace)/Extension/vsix
- powershell: |
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
displayName: Scorch workspace
- deployment: Deploy3
displayName: Download mentioned Artifacts with other properties mentioned
pool: hosted
environment: env_1_19
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: Extension
patterns: '*.txt'
- powershell: |
ls $(Pipeline.Workspace)/Extension/
- powershell: |
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
displayName: Scorch workspace
- deployment: Deploy4
displayName: Download None
pool: hosted
environment: env_1_19
strategy:
runOnce:
deploy:
steps:
- download: none
- powershell: ls $(Pipeline.Workspace) -r #Check the content of the workspace directory
displayName: Explore workspace