-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
103 lines (89 loc) · 2.63 KB
/
azure-pipelines.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
# Global variables
variables:
project_name: "Documentation - Homepage"
project_name_clean: "homepage"
yarn_cache_folder: $(Pipeline.Workspace)/.yarn/cache
trigger:
batch: true
branches:
include:
- master
tags:
include:
- "*"
pr:
- master
jobs:
- job: 'PushToQA'
displayName: "Publish to the QA"
pool:
vmImage: "windows-2019"
steps:
- task: DeleteFiles@1
displayName: 'Remove files to be ignored in publication'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
.git*
.gitignore
.gitmodules
.vscode*
azure-pipelines.yml
package.json
yarn.lock
- powershell: |
Rename-Item -Path "robots_qa.txt" -NewName "robots.txt"
Remove-Item -Path "robots_prod.txt"
workingDirectory: '$(System.DefaultWorkingDirectory)'
displayName: 'Rename robots.txt file for QA'
- task: AzureFileCopy@3
displayName: 'Copy files to Azure Storage Blob: qaisogeohelp/$web/'
inputs:
SourcePath: '$(System.DefaultWorkingDirectory)'
azureSubscription: 'Isogeo - MPN(82885610-5841-4749-8d71-46f56b643ad2)'
Destination: 'AzureBlob'
storage: 'qaisogeohelp'
ContainerName: '$web'
- job: 'PushToPROD'
displayName: "Publish to the PROD"
pool:
vmImage: "windows-2019"
condition:
contains(variables['Build.SourceBranch'], 'tags')
steps:
- task: DeleteFiles@1
displayName: 'Remove files to be ignored in publication'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
.git*
.gitignore
.gitmodules
.vscode*
azure-pipelines.yml
package.json
yarn.lock
- powershell: |
Rename-Item -Path "robots_prod.txt" -NewName "robots.txt"
Remove-Item -Path "robots_qa.txt"
workingDirectory: '$(System.DefaultWorkingDirectory)'
displayName: 'Rename robots.txt file for PROD'
- task: GitHubRelease@1
displayName: 'Publish release on Github'
inputs:
gitHubConnection: 'github_isogeo'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
assets: '$(Build.ArtifactStagingDirectory)/*'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'issueBased'
- task: AzureFileCopy@3
displayName: 'Copy files to Azure Storage Blob: prodisogeohelp/$web/'
inputs:
SourcePath: '$(System.DefaultWorkingDirectory)'
azureSubscription: 'Isogeo - MPN(82885610-5841-4749-8d71-46f56b643ad2)'
Destination: 'AzureBlob'
storage: 'prodisogeohelp'
ContainerName: '$web'