forked from ordercloud-api/headstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-azure-pipelines.yml
30 lines (27 loc) · 1012 Bytes
/
docker-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
resources:
- repo: self
clean: true
stages:
- stage: Build_Headstart
displayName: "Build Headstart Images"
jobs:
- job: Build_Headstart_Job
pool:
name: docker-linux-agents
workspace:
clean: all
steps:
- template: version.yml
- task: PowerShell@2
displayName: "Build Headstart Containers"
inputs:
targetType: "inline"
script: |
$version = if ([string]::IsNullOrEmpty("$(Build.BuildNumber)")) {"latest"} else {"$(Build.BuildNumber)"}
az login -u "$(container.registry.username)" -p "$(container.registry.password)" -t "$(container.registry.tenant)"
az acr login -n $(container.registry.short)
$env:REGISTRY="$(container.registry)/headstart/"
$env:VERSION = $version
$env:COSMOS_TAG = "latest"
docker-compose build --parallel
docker-compose push