forked from CoinVault/Nako
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.docker.yml
23 lines (21 loc) · 1.13 KB
/
azure-pipelines.docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pool:
vmImage: 'Ubuntu-16.04'
steps:
- powershell: |
$version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
Write-Host "##vso[task.setvariable variable=Build.BuildNumber]$version"
Write-Host "##vso[task.setvariable variable=App.BuildNumber]$version"
Write-Host "BUILD_REASON: $Env:BUILD_REASON"
Write-Host "BUILD_SOURCEBRANCH: $Env:BUILD_SOURCEBRANCH"
Write-Host "BUILD_SOURCEBRANCHNAME: $Env:BUILD_SOURCEBRANCHNAME"
Write-Host "SYSTEM_PULLREQUEST_PULLREQUESTID: $Env:SYSTEM_PULLREQUEST_PULLREQUESTID"
Write-Host "SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: $Env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
Write-Host "SYSTEM_PULLREQUEST_SOURCEBRANCH: $Env:SYSTEM_PULLREQUEST_SOURCEBRANCH"
displayName: version number
- script: docker build -f core/Dockerfile -t $(dockerId)/$(imageName) ./core/
- script: |
docker tag $(dockerId)/$(imageName) latest
docker tag $(dockerId)/$(imageName) $(dockerId)/$(imageName):$(App.BuildNumber)
- script: |
docker login -u $(dockerId) -p $(dockerPassword)
docker push $(dockerId)/$(imageName)