forked from AjayTester1/Envkalyan
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CurrentPipelineFCS.yml
109 lines (100 loc) · 3.25 KB
/
CurrentPipelineFCS.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
trigger: none
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build job
pool: Azure Pipelines
steps:
- script: echo Hello, world! This is CI job
displayName: 'Run a one-line script'
- task: PublishBuildArtifacts@1
displayName: Create Artifact
inputs:
artifactName: Artifact1
pathToPublish: BVT\testFolder
- stage: QA
displayName: QA stage
jobs:
- job: NoArtifactJob
pool: Azure Pipelines
steps:
- powershell: ls $(Pipeline.Workspace) -r #Check the content of the workspace directory
- job: DownloadAllArtifactJob
pool: Azure Pipelines
steps:
- download: current
- 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: DownloadParticularArtifactJob
pool: Azure Pipelines
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
- stage: Deploy
displayName: Deploy stage
jobs:
- deployment: Deploy0
displayName: Upload New Artifact
pool: hosted
environment: Environment01
strategy:
runOnce:
deploy:
steps:
- download: none
- checkout: self
- task: PublishBuildArtifacts@1
displayName: Create Artifact
inputs:
artifactName: Extension
pathToPublish: BVT\Extension
- deployment: Deploy1
displayName: Download All Artifacts
pool: hosted
dependsOn: Deploy0
environment: Environment01
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 with other properties mentioned
pool: hosted
dependsOn: Deploy0
environment: Environment01
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: Extension
patterns: '**/*.txt'
- powershell: |
ls $(Pipeline.Workspace)/
ls $(Pipeline.Workspace)/Extension/
- powershell: |
Remove-Item $(Pipeline.Workspace)\Extension -Recurse -Force
displayName: Scorch workspace