forked from AjayTester1/Envkalyan
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CurrentPipelineMixed.yml
164 lines (151 loc) · 5.39 KB
/
CurrentPipelineMixed.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#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
- task: PublishBuildArtifacts@1
displayName: Create Artifact
inputs:
artifactName: Artifact2
PathtoPublish: BVT\src
- task: PublishBuildArtifacts@1
displayName: Create Artifact
inputs:
artifactName: Artifact3
PathtoPublish: BVT\NewTestFolder
- 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
ls $(Pipeline.Workspace)/Artifact2/
ls $(Pipeline.Workspace)/Artifact2/App.js
ls $(Pipeline.Workspace)/Artifact3/
ls $(Pipeline.Workspace)/Artifact3/test.ps1
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact1 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Artifact2 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Artifact3 -Recurse -Force
displayName: Scorch workspace
- job: DownloadParticularPipelineArtifact
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: DownloadParticularFCSArtifact
pool: Hosted
steps:
- download: current
artifact: Artifact3
- powershell: |
ls $(Pipeline.Workspace)/
ls $(Pipeline.Workspace)/Artifact3
ls $(Pipeline.Workspace)/Artifact3/test.ps1
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact3 -Recurse -Force
displayName: Scorch workspace
- stage: Deploy
displayName: Deploy stage
jobs:
- deployment: Deploy1
displayName: Download All Artifacts
pool: hosted
environment: Environment01
strategy:
runOnce:
deploy:
steps:
- powershell: |
ls $(Pipeline.Workspace)/
ls $(Pipeline.Workspace)/Artifact1
ls $(Pipeline.Workspace)/Artifact1/a.txt
ls $(Pipeline.Workspace)/Extension/
ls $(Pipeline.Workspace)/Extension/Extension.txt
ls $(Pipeline.Workspace)/Artifact2/
ls $(Pipeline.Workspace)/Artifact2/App.js
ls $(Pipeline.Workspace)/Artifact3/
ls $(Pipeline.Workspace)/Artifact3/test.ps1
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact1 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Artifact2 -Recurse -Force
Remove-Item $(Pipeline.Workspace)\Artifact3 -Recurse -Force
displayName: Scorch workspace
- deployment: Deploy2
displayName: Download mentioned pipeline Artifacts
pool: hosted
environment: Environment01
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 FCS Artifacts
pool: hosted
environment: Environment01
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: Artifact2
patterns: '**/*.js'
- powershell: |
ls $(Pipeline.Workspace)/Artifact2/
- powershell: |
Remove-Item $(Pipeline.Workspace)\Artifact2 -Recurse -Force
displayName: Scorch workspace
- deployment: Deploy4
displayName: Download None
pool: hosted
environment: Environment01
strategy:
runOnce:
deploy:
steps:
- download: none
- powershell: ls $(Pipeline.Workspace) -r #Check the content of the workspace directory
displayName: Explore workspace