-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathrelease.yml
More file actions
53 lines (49 loc) · 1.65 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (49 loc) · 1.65 KB
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
#=============================================================================
# Release pipeline:
#
# This pipeline performs deployment actions upon a HEMCO release.
# Currently, the only deployment action is to build and push a docker
# container with prebuilt HEMCO executable for the newly released version.
# This pipeline is triggered by tagged versions excluding
# pre-releases.
#=============================================================================
trigger:
branches:
exclude:
- '*'
tags:
include:
- '*'
exclude:
- '*-alpha*'
- '*-beta*'
- '*-rc*'
pr: none
# Basic agent set up
pool:
vmImage: 'ubuntu-latest'
# Login to Docker Hub, build the image, and push the built image
# to Docker Hub
steps:
- script: VERSION_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG"
displayName: Get the repo's tag
- task: Docker@2
displayName: Login to Docker Hub
inputs:
command: login
containerRegistry: DockerHub # The name of the service connection in the Azure project
- task: Docker@2
displayName: Build image
inputs:
command: build
buildContext: $(Build.Repository.LocalPath) # The path to the source code repo
Dockerfile: .ci-pipelines/release.dockerfile
repository: geoschemdev/hemco # Docker Hub repository
tags: $(VERSION_TAG) # Source code repo's tag
- task: Docker@2
displayName: Push image
inputs:
containerRegistry: DockerHub
repository: geoschemdev/hemco # Docker Hub repository
command: push
tags: $(VERSION_TAG)