Skip to content

Commit 24d6ee8

Browse files
committed
Update azure-pipelines-eu.yml for Azure Pipelines EU
1 parent 3a961f3 commit 24d6ee8

1 file changed

Lines changed: 27 additions & 26 deletions

File tree

azure-pipelines-eu.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Works
12
trigger:
23
- none
34

@@ -6,40 +7,40 @@ pool:
67

78
stages:
89

9-
- stage: Build_africa
10-
displayName: Build stage africa
10+
- stage: Build_europe
11+
displayName: Build stage europe
1112
jobs:
12-
- job: Build_africa
13+
- job: Build_europe
1314
steps:
1415

1516
- task: DownloadSecureFile@1
16-
displayName: 'download AFRICA backendend'
17+
displayName: 'download EU backendend'
1718
inputs:
18-
secureFile: 'BACKEND_ENV_FILE_AFRICA' # string. Required. Secure File.
19+
secureFile: 'BACKEND_ENV_FILE_EU' # string. Required. Secure File.
1920

2021
- task: CopyFiles@2
21-
displayName: 'copy africa backendend'
22+
displayName: 'copy europe backendend'
2223
inputs:
2324
SourceFolder: '$(Agent.TempDirectory)'
24-
Contents: BACKEND_ENV_FILE_AFRICA
25+
Contents: BACKEND_ENV_FILE_EU
2526
TargetFolder: './backend'
2627

27-
- script: mv ./backend/BACKEND_ENV_FILE_AFRICA ./backend/.env
28-
displayName: 'rename africa .env'
28+
- script: mv ./backend/BACKEND_ENV_FILE_EU ./backend/.env
29+
displayName: 'rename europe .env'
2930
- task: DownloadSecureFile@1
30-
displayName: 'download africa frontend'
31+
displayName: 'download europe frontend'
3132
inputs:
32-
secureFile: 'FRONTEND_ENV_FILE_AFRICA' # string. Required. Secure File.
33+
secureFile: 'FRONTEND_ENV_FILE_EU' # string. Required. Secure File.
3334

3435
- task: CopyFiles@2
35-
displayName: 'copy africa frontend'
36+
displayName: 'copy europe frontend'
3637
inputs:
3738
SourceFolder: '$(Agent.TempDirectory)'
38-
Contents: FRONTEND_ENV_FILE_AFRICA
39+
Contents: FRONTEND_ENV_FILE_EU
3940
TargetFolder: './frontend'
4041

41-
- script: mv ./frontend/FRONTEND_ENV_FILE_AFRICA ./frontend/.env
42-
displayName: 'rename africa .env'
42+
- script: mv ./frontend/FRONTEND_ENV_FILE_EU ./frontend/.env
43+
displayName: 'rename europe .env'
4344

4445
- script: ls -a ./frontend
4546
displayName: 'ls'
@@ -70,24 +71,24 @@ stages:
7071
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
7172
replaceExistingArchive: true
7273
- upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
73-
artifact: drop_africa
74+
artifact: drop_eu
7475

75-
- deployment: VMDeploy_AFRICA
76-
dependsOn: Build_africa
77-
displayName: DEPLOY AFRICA
76+
- deployment: VMDeploy_EU
77+
dependsOn: Build_europe
78+
displayName: DEPLOY EU
7879
environment:
7980
name: PROD
8081
resourceType: VirtualMachine
81-
tags: africa
82+
tags: europe
8283
strategy:
8384
runOnce:
8485
preDeploy:
8586
steps:
8687
- task: DownloadPipelineArtifact@2
8788
inputs:
8889
buildType: 'current'
89-
artifactName: drop_africa
90-
targetPath: '$(Pipeline.Workspace)/drop'
90+
artifactName: drop_eu
91+
targetPath: '$(Pipeline.Workspace)/drop_eu'
9192

9293
- script: echo initialize, cleanup, backup, install certs
9394

@@ -103,21 +104,21 @@ stages:
103104
104105
- task: ExtractFiles@1
105106
inputs:
106-
archiveFilePatterns: '$(Pipeline.Workspace)/drop_africa/$(Build.BuildId).zip'
107+
archiveFilePatterns: '$(Pipeline.Workspace)/drop_eu/$(Build.BuildId).zip'
107108
destinationFolder: '$(Pipeline.Workspace)/japp'
108109
cleanDestinationFolder: true
109110
overwriteExistingFiles: true
110111

111112
- task: DeleteFiles@1
112113
inputs:
113-
SourceFolder: '$(Pipeline.Workspace)/drop_africa'
114+
SourceFolder: '$(Pipeline.Workspace)/drop_eu'
114115
Contents: '$(Build.BuildId).zip'
115116

116117
- task: Bash@3
117118
inputs:
118119
targetType: 'inline'
119120
script: |
120-
cd /home/azureuser/azagent/_work/1/japp
121+
cd /home/azureuser/azagent/_work/2/japp
121122
pm2 restart index
122123
sudo systemctl restart nginx
123124
@@ -133,4 +134,4 @@ stages:
133134
- script: echo Restore from backup! This is on failure
134135
success:
135136
steps:
136-
- script: echo Notify! This is on success
137+
- script: echo Notify! This is on success

0 commit comments

Comments
 (0)