-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
53 lines (45 loc) · 1.23 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
# 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
trigger:
tags:
include:
- "*"
paths:
exclude:
- README.md
- VERSION.md
- .gitignore
- .gitattributes
- .editorconfig
- example/*
pool: Default
variables:
REPOSITORY: ops/aws-sqs-k8s-job-worker
resources:
repositories:
- repository: ops-pipelines
type: git
name: OPS/ops-pipelines
steps:
- template: templates/commit-sha.yaml@ops-pipelines
- script: |
latest_tag=$(git describe --tags --abbrev=0)
if [ $? -eq 0 ]; then
echo "Latest Git tag: $latest_tag"
else
echo "No tags found in this repository, set to v0.1.0"
latest_tag=v0.1.0
fi
echo "##vso[task.setvariable variable=IMAGE_TAG]$latest_tag"
env: { sourceVersion: $(Build.SourceVersion) }
displayName: Create image tag variable
- template: templates/docker-build.yaml@ops-pipelines
parameters:
dockerfile: build/Dockerfile
repository: $(REPOSITORY)
image_tag: "$(IMAGE_TAG)"
multi_platform: true
sync_china: true
sync_eti: true