forked from MyGrades/mygrades-server
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
79 lines (67 loc) · 2.43 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
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
jobs:
- job: build
displayName: build and deploy configurations
pool:
vmImage: 'windows-2019'
steps:
- task: CmdLine@2
inputs:
script: 'node index.js'
workingDirectory: '$(Build.SourcesDirectory)\server'
failOnStderr: true
# Previous v0.0.1 Endpoint
- task: AzureFileCopy@3
inputs:
SourcePath: '$(Build.SourcesDirectory)\server\dist'
azureSubscription: 'Aquiver.MyGradesReloaded'
Destination: 'AzureBlob'
storage: 'mygradesreloaded'
ContainerName: '$web'
BlobPrefix: 'api'
# Previous v0.0.1 Endpoint
- task: AzureFileCopy@3
inputs:
SourcePath: '$(Build.SourcesDirectory)\server\dist'
azureSubscription: 'MyGradesReloaded - Azure'
Destination: 'AzureBlob'
storage: 'mygradesapi'
ContainerName: '$web'
- task: AzureCLI@2
inputs:
azureSubscription: 'Visual Studio Enterprise – MPN(44678328-75c5-4e48-92c0-b2ab31d5166c)'
scriptType: 'ps'
scriptLocation: 'inlineScript'
inlineScript: 'az cdn endpoint purge -g Aquiver -n mygradesapi --profile-name Aquiver --content-paths ''/*'''
- job: buildFrontend
displayName: build and deploy frontend
pool:
vmImage: 'windows-2019'
steps:
- task: CmdLine@2
inputs:
script: 'npm install'
workingDirectory: '$(Build.SourcesDirectory)\frontend\mygradesreloaded'
- task: CmdLine@2
inputs:
script: 'npm run build'
workingDirectory: '$(Build.SourcesDirectory)\frontend\mygradesreloaded'
- task: AzureFileCopy@3
inputs:
SourcePath: '$(Build.SourcesDirectory)\frontend\mygradesreloaded\dist\mygradesreloaded'
azureSubscription: 'Aquiver.MyGradesReloaded'
Destination: 'AzureBlob'
storage: 'mygradesreloaded'
ContainerName: '$web'
# - task: AzureCLI@2
# inputs:
# azureSubscription: 'Visual Studio Enterprise – MPN(44678328-75c5-4e48-92c0-b2ab31d5166c)'
# scriptType: 'ps'
# scriptLocation: 'inlineScript'
# inlineScript: 'az cdn endpoint purge -g Aquiver -n mygradesapi --profile-name Aquiver --content-paths ''/*'''