forked from microsoft/presidio
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
39 lines (39 loc) · 1.25 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
resources:
- repo: self
queue:
name: Hosted Ubuntu 1604
timeoutInMinutes: 60
variables:
GOBIN: "$(GOPATH)/bin"
GOPATH: "$(system.defaultWorkingDirectory)/gopath"
modulePath: "$(GOPATH)/src/github.com/$(build.repository.name)"
GOROOT: "/usr/local/go1.11"
steps:
- task: Docker@1
displayName: "ACR Login"
inputs:
containerregistrytype: "Container Registry"
dockerRegistryEndpoint: presidio
command: login
- task: GoTool@0
inputs:
version: '1.13.5'
displayName: "Setup Go Env - Go Tool"
- bash: |
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
shopt -s extglob
mv !(gopath) '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: "Prepare directories"
- bash: |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
make DOCKER_REGISTRY=$(DOCKER_REGISTRY) PRESIDIO_LABEL=$(Build.BuildID) test-functional
workingDirectory: "$(modulePath)"
displayName: "Build & Test "
- bash: "make DOCKER_REGISTRY=$(DOCKER_REGISTRY) PRESIDIO_LABEL=$(Build.BuildID) docker-push"
workingDirectory: "$(modulePath)"
displayName: "Push Docker Images"