-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
61 lines (58 loc) · 1.47 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
trigger:
- master
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Build image
inputs:
command: build
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
repository: coocoofroggy/otalive
tags: |
latest
- task: CmdLine@2
displayName: Save image to file
inputs:
script: 'docker save -o $BUILD_ARTIFACTSTAGINGDIRECTORY/image.tar coocoofroggy/otalive'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Image'
publishLocation: 'Container'
- stage: Deploy
displayName: Deploy
jobs:
- job: Deploy
displayName: Deploy
pool:
name: Default
demands:
- agent.name -equals OTA-Live-VM
steps:
- checkout: none
- task: Bash@3
inputs:
filePath: '/home/coocoofroggy/stopper.sh'
arguments: 'coocoofroggy/otalive'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Image'
downloadPath: '$(System.ArtifactsDirectory)'
cleanDestinationFolder: true
- task: Bash@3
inputs:
filePath: '/home/coocoofroggy/otaliveupdater.sh'
arguments: '$SYSTEM_ARTIFACTSDIRECTORY/Image/image.tar'