-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
58 lines (58 loc) · 1.71 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
stages:
- stage: Build
jobs:
- job: Build
pool:
name: Azure Pipelines
steps:
- script: 'npm i node-gyp'
displayName: 'Install node-gyp'
- task: NodeTool@0
displayName: 'Use Node version'
inputs:
versionSpec: 12
checkLatest: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
displayName: 'Use Python 3.7'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- task: ArchiveFiles@1
displayName: 'Archive files '
inputs:
rootFolder: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
- task: CopyFiles@2
displayName: 'Copy File to: ArtifactsToBePublished'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)'
Contents: '$(Build.BuildId).zip'
TargetFolder: '$(Build.ArtifactStagingDirectory)\ArtifactsToBePublished'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\ArtifactsToBePublished'
- stage: Deploy
jobs:
- deployment: DeployWeb
pool:
name: Azure Pipelines
environment: 'econext-dev'
strategy:
runOnce:
deploy:
steps:
- task: AzureRmWebAppDeployment@3
displayName: 'Deploy Azure App Service'
inputs:
azureSubscription: 'econext - 1 - Azure'
appType: applinux
WebAppName: econext
ImageSource: Builtin
RuntimeStack: 'NODE|12-lts'
StartupCommand: 'node server.js'
ScriptType: 'Inline Script'
InlineScript: 'npm rebuild node-sass'