forked from w3champions/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
30 lines (27 loc) · 973 Bytes
/
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
name: $(Build.BuildID)
pool:
vmImage: "ubuntu-18.04"
steps:
- task: PowerShell@2
inputs:
targetType: "inline"
script: |
if(!("$(Build.Reason)".Equals("PullRequest"))){
Write-Host "##vso[task.setvariable variable=BuildVersioning]$(Build.BuildID)"
Write-Host "##vso[task.setvariable variable=IsLatest]latest"
Write-Host "Masterversion: $(Build.BuildID)"
} else {
Write-Host "##vso[task.setvariable variable=BuildVersioning]dev-$(System.PullRequest.PullRequestNumber)"
Write-Host "##vso[task.setvariable variable=IsLatest]"
Write-Host "PR-Version: dev-$(System.PullRequest.PullRequestNumber)"
}
- task: Docker@2
inputs:
containerRegistry: "official-docker-modmoto"
repository: "modmoto/w3champions-ui"
command: "buildAndPush"
Dockerfile: "**/Dockerfile"
buildContext: "."
tags: |
$(BuildVersioning)
$(IsLatest)