/
azure-pipelines.yml
53 lines (47 loc) · 1.64 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
# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
GOBIN: '$(GOPATH)/bin' # Go binaries path
PLUGIN_DIR: '$(GOBIN)'
# GOBIN: '$(GOPATH)/bin' # Go binaries path
# GOROOT: '/usr/local/go1.11' # Go installation path
# GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/fossul' # Path to the module's code
steps:
- script: |
echo "GOBIN $(GOBIN)"
echo "GOPATH $(GOPATH)"
echo "code $(GOPATH)/src/github.com/$(build.repository.name)"#
#ls -R $(system.defaultWorkingDirectory)
mkdir -p '$(GOPATH)'
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(GOPATH)/src/fossul'
mv $(system.defaultWorkingDirectory)/* $(system.defaultWorkingDirectory)/gopath/src/fossul
shopt -s extglob
shopt -s dotglob
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: 'Set up the Go workspace'
- script: |
go version
#go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
echo "HELLO 111111"
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
#$(GOPATH)/fossul-build.sh
$(GOPATH)/src/fossul/fossul-server-build.sh
$(GOPATH)/src/fossul/fossul-app-build.sh
$(GOPATH)/src/fossul/fossul-storage-build.sh
#go build -v .
workingDirectory: '$(GOPATH)/src/fossul'
displayName: 'Get dependencies, then build'