-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
58 lines (52 loc) · 1.45 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
name: 0.1.$(Rev:r)
variables:
# - group: hpoc-prism-central
- group: demo-cluster
trigger:
- main
pool: 'default'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build job
steps:
- task: Docker@2
displayName: Build image
inputs:
repository: wolfganghuse/calm-dsl
command: build
# arguments: '--no-cache'
tags: |
latest
$(Build.BuildId)
- task: Docker@2
inputs:
containerRegistry: 'wolfganghuse-dockerhub'
repository: 'wolfganghuse/calm-dsl'
command: 'push'
tags: |
latest
$(Build.BuildId)
- stage: Deploy
jobs:
- deployment: DeployCalm
displayName: 'Deploy to Calm'
container:
image: wolfganghuse/calm-dsl:latest
environment: 'dev'
strategy:
runOnce:
deploy:
steps:
- checkout: self
- script: |
sudo ln -s /root/.local/bin/calm /usr/local/bin/calm
sudo calm init dsl -i $(pc_ip) -P $(pc_port) -u $(pc_user) -p $(pc_pass) -pj $(calm_project)
sudo calm create bp -fc -f erapostgres.py -d "created by Azure Pipeline Build: $(Build.BuildId)"
sudo py3clean .