Skip to content

Commit dc2de06

Browse files
committed
Update azure-pipelines-1.yml for Azure Pipelines
1 parent 5474ebb commit dc2de06

1 file changed

Lines changed: 131 additions & 131 deletions

File tree

azure-pipelines-1.yml

Lines changed: 131 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -167,72 +167,72 @@ stages:
167167

168168

169169

170-
- stage: Build_eu
171-
displayName: Build stage
172-
dependsOn: Build
173-
jobs:
174-
- job: Build_eu
175-
steps:
170+
# - stage: Build_eu
171+
# displayName: Build stage
172+
# dependsOn: Build
173+
# jobs:
174+
# - job: Build_eu
175+
# steps:
176176

177-
- task: DownloadSecureFile@1
178-
displayName: 'download EU backendend'
179-
inputs:
180-
secureFile: 'BACKEND_ENV_FILE_EU' # string. Required. Secure File.
181-
182-
- task: CopyFiles@2
183-
displayName: 'copy EU backendend'
184-
inputs:
185-
SourceFolder: '$(Agent.TempDirectory)'
186-
Contents: BACKEND_ENV_FILE_EU
187-
TargetFolder: './backend'
188-
189-
- script: mv ./backend/BACKEND_ENV_FILE_EU ./backend/.env
190-
displayName: 'rename eu .env'
191-
- task: DownloadSecureFile@1
192-
displayName: 'download eu frontend'
193-
inputs:
194-
secureFile: 'FRONTEND_ENV_FILE_EU' # string. Required. Secure File.
195-
196-
- task: CopyFiles@2
197-
displayName: 'copy eu frontend'
198-
inputs:
199-
SourceFolder: '$(Agent.TempDirectory)'
200-
Contents: FRONTEND_ENV_FILE_EU
201-
TargetFolder: './frontend'
202-
203-
- script: mv ./frontend/FRONTEND_ENV_FILE_EU ./frontend/.env
204-
displayName: 'rename eu .env'
205-
206-
- script: ls -a ./frontend
207-
displayName: 'ls'
208-
209-
- script: ls -Rn
210-
displayName: 'ls'
211-
212-
- task: NodeTool@0
213-
inputs:
214-
versionSpec: '12.20.1'
215-
displayName: 'Install Node.js'
216-
217-
- task: Bash@3
218-
inputs:
219-
targetType: 'inline'
220-
script: |
221-
node -v
222-
npm -v
223-
npm install
224-
npm run build
225-
226-
- task: ArchiveFiles@2
227-
displayName: 'Archive files'
228-
inputs:
229-
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
230-
includeRootFolder: false
231-
archiveType: zip
232-
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
233-
replaceExistingArchive: true
234-
- upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
235-
artifact: drop_eu
177+
# - task: DownloadSecureFile@1
178+
# displayName: 'download EU backendend'
179+
# inputs:
180+
# secureFile: 'BACKEND_ENV_FILE_EU' # string. Required. Secure File.
181+
182+
# - task: CopyFiles@2
183+
# displayName: 'copy EU backendend'
184+
# inputs:
185+
# SourceFolder: '$(Agent.TempDirectory)'
186+
# Contents: BACKEND_ENV_FILE_EU
187+
# TargetFolder: './backend'
188+
189+
# - script: mv ./backend/BACKEND_ENV_FILE_EU ./backend/.env
190+
# displayName: 'rename eu .env'
191+
# - task: DownloadSecureFile@1
192+
# displayName: 'download eu frontend'
193+
# inputs:
194+
# secureFile: 'FRONTEND_ENV_FILE_EU' # string. Required. Secure File.
195+
196+
# - task: CopyFiles@2
197+
# displayName: 'copy eu frontend'
198+
# inputs:
199+
# SourceFolder: '$(Agent.TempDirectory)'
200+
# Contents: FRONTEND_ENV_FILE_EU
201+
# TargetFolder: './frontend'
202+
203+
# - script: mv ./frontend/FRONTEND_ENV_FILE_EU ./frontend/.env
204+
# displayName: 'rename eu .env'
205+
206+
# - script: ls -a ./frontend
207+
# displayName: 'ls'
208+
209+
# - script: ls -Rn
210+
# displayName: 'ls'
211+
212+
# - task: NodeTool@0
213+
# inputs:
214+
# versionSpec: '12.20.1'
215+
# displayName: 'Install Node.js'
216+
217+
# - task: Bash@3
218+
# inputs:
219+
# targetType: 'inline'
220+
# script: |
221+
# node -v
222+
# npm -v
223+
# npm install
224+
# npm run build
225+
226+
# - task: ArchiveFiles@2
227+
# displayName: 'Archive files'
228+
# inputs:
229+
# rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
230+
# includeRootFolder: false
231+
# archiveType: zip
232+
# archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
233+
# replaceExistingArchive: true
234+
# - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
235+
# artifact: drop_eu
236236

237237

238238

@@ -361,80 +361,80 @@ stages:
361361
# artifact: drop_africa
362362

363363

364-
- deployment: VMDeploy_EU
365-
dependsOn: Build_eu
366-
displayName: DEPRLOY EU
367-
environment:
368-
name: PROD
369-
resourceType: VirtualMachine
370-
tags: europe
371-
strategy:
372-
runOnce:
373-
preDeploy:
374-
steps:
375-
- task: DownloadPipelineArtifact@2
376-
inputs:
377-
buildType: 'current'
378-
#project: # string. Required when source == specific. Project.
379-
#definition: # string. Alias: pipeline. Required when source == specific. Build pipeline.
380-
#specificBuildWithTriggering: false # boolean. Alias: preferTriggeringPipeline. Optional. Use when source == specific. When appropriate, download artifacts from the triggering build. Default: false.
381-
#buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Alias: runVersion. Required when source == specific. Build version to download. Default: latest.
382-
#branchName: 'refs/heads/master' # string. Alias: runBranch. Required when source == specific && runVersion == latestFromBranch. Branch name. Default: refs/heads/master.
383-
#pipelineId: # string. Alias: runId | buildId. Required when source == specific && runVersion == specific. Build.
384-
#tags: # string. Optional. Use when source == specific && runVersion != specific. Build Tags.
385-
#allowPartiallySucceededBuilds: false # boolean. Optional. Use when source == specific && runVersion != specific. Download artifacts from partially succeeded builds. Default: false.
386-
#allowFailedBuilds: false # boolean. Optional. Use when source == specific && runVersion != specific. Download artifacts from failed builds. Default: false.
387-
artifactName: drop_eu
388-
#itemPattern: '**' # string. Alias: patterns. Matching patterns. Default: **.
389-
targetPath: '$(Pipeline.Workspace)/drop'
364+
# - deployment: VMDeploy_EU
365+
# dependsOn: Build_eu
366+
# displayName: DEPRLOY EU
367+
# environment:
368+
# name: PROD
369+
# resourceType: VirtualMachine
370+
# tags: europe
371+
# strategy:
372+
# runOnce:
373+
# preDeploy:
374+
# steps:
375+
# - task: DownloadPipelineArtifact@2
376+
# inputs:
377+
# buildType: 'current'
378+
# #project: # string. Required when source == specific. Project.
379+
# #definition: # string. Alias: pipeline. Required when source == specific. Build pipeline.
380+
# #specificBuildWithTriggering: false # boolean. Alias: preferTriggeringPipeline. Optional. Use when source == specific. When appropriate, download artifacts from the triggering build. Default: false.
381+
# #buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Alias: runVersion. Required when source == specific. Build version to download. Default: latest.
382+
# #branchName: 'refs/heads/master' # string. Alias: runBranch. Required when source == specific && runVersion == latestFromBranch. Branch name. Default: refs/heads/master.
383+
# #pipelineId: # string. Alias: runId | buildId. Required when source == specific && runVersion == specific. Build.
384+
# #tags: # string. Optional. Use when source == specific && runVersion != specific. Build Tags.
385+
# #allowPartiallySucceededBuilds: false # boolean. Optional. Use when source == specific && runVersion != specific. Download artifacts from partially succeeded builds. Default: false.
386+
# #allowFailedBuilds: false # boolean. Optional. Use when source == specific && runVersion != specific. Download artifacts from failed builds. Default: false.
387+
# artifactName: drop_eu
388+
# #itemPattern: '**' # string. Alias: patterns. Matching patterns. Default: **.
389+
# targetPath: '$(Pipeline.Workspace)/drop'
390390

391391

392-
- script: echo initialize, cleanup, backup, install certs
392+
# - script: echo initialize, cleanup, backup, install certs
393393

394-
deploy:
395-
steps:
396-
- task: Bash@3
397-
inputs:
398-
targetType: 'inline'
399-
script: |
400-
# Modify deployment script based on the app type
401-
echo "Starting deployment script run"
394+
# deploy:
395+
# steps:
396+
# - task: Bash@3
397+
# inputs:
398+
# targetType: 'inline'
399+
# script: |
400+
# # Modify deployment script based on the app type
401+
# echo "Starting deployment script run"
402402

403403

404-
- task: ExtractFiles@1
405-
inputs:
406-
archiveFilePatterns: '$(Pipeline.Workspace)/drop_eu/$(Build.BuildId).zip'
407-
destinationFolder: '$(Pipeline.Workspace)/japp'
408-
cleanDestinationFolder: true
409-
overwriteExistingFiles: true
410-
#pathToSevenZipTool: # string. Path to 7z utility.
404+
# - task: ExtractFiles@1
405+
# inputs:
406+
# archiveFilePatterns: '$(Pipeline.Workspace)/drop_eu/$(Build.BuildId).zip'
407+
# destinationFolder: '$(Pipeline.Workspace)/japp'
408+
# cleanDestinationFolder: true
409+
# overwriteExistingFiles: true
410+
# #pathToSevenZipTool: # string. Path to 7z utility.
411411

412-
- task: DeleteFiles@1
413-
inputs:
414-
SourceFolder: '$(Pipeline.Workspace)/drop_eu'
415-
Contents: '$(Build.BuildId).zip'
412+
# - task: DeleteFiles@1
413+
# inputs:
414+
# SourceFolder: '$(Pipeline.Workspace)/drop_eu'
415+
# Contents: '$(Build.BuildId).zip'
416416

417-
- task: Bash@3
418-
inputs:
419-
targetType: 'inline'
420-
script: |
421-
cd /home/azureuser/azagent/_work/1/japp
422-
pm2 restart index
423-
sudo systemctl restart nginx
417+
# - task: Bash@3
418+
# inputs:
419+
# targetType: 'inline'
420+
# script: |
421+
# cd /home/azureuser/azagent/_work/1/japp
422+
# pm2 restart index
423+
# sudo systemctl restart nginx
424424

425-
routeTraffic:
426-
steps:
427-
- script: echo routing traffic
428-
postRouteTraffic:
429-
steps:
430-
- script: echo health check post-route traffic
431-
on:
432-
failure:
433-
steps:
434-
- script: echo Restore from backup! This is on failure
435-
success:
436-
steps:
437-
- script: echo Notify! This is on success
425+
# routeTraffic:
426+
# steps:
427+
# - script: echo routing traffic
428+
# postRouteTraffic:
429+
# steps:
430+
# - script: echo health check post-route traffic
431+
# on:
432+
# failure:
433+
# steps:
434+
# - script: echo Restore from backup! This is on failure
435+
# success:
436+
# steps:
437+
# - script: echo Notify! This is on success
438438

439439

440440

0 commit comments

Comments
 (0)