-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yaml
51 lines (48 loc) · 1.4 KB
/
azure-pipelines.yaml
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
name: Azure Pipelines
stages:
- stage: Build
jobs:
- job: Build
pool:
name: Hosted Ubuntu 1604
steps:
- task: ArchiveFiles@2
displayName: 'Archive Azure Vote'
inputs:
rootFolderOrFile: 'azure-vote'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-azurevote.zip'
- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-azurevote.zip
displayName: 'Upload Package'
artifact: drop-azurevote
- stage:
jobs:
- deployment: VMDeploy
pool:
vmImage: 'Ubuntu-16.04'
displayName: Deploy to VMSS
environment:
name: ACDND-C4-Project
resourceType: VirtualMachine
strategy:
runOnce:
deploy:
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: |
#! /bin/bash
pip3 install redis
pip3 install opencensus-ext-azure
pip3 install flask
pip3 install opencensus-ext-flask
cd ~/
DIR=/home/udacityadmin/app
if [ ! -d "$DIR" ]; then
mkdir app
fi
mv /home/udacityadmin/azagent/_work/1/drop-azurevote/$(Build.BuildId)-azurevote.zip app
cd app
unzip -o $(Build.BuildId)-azurevote.zip