diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d558b0992..05f995c49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,35 +9,16 @@ trigger: pool: vmImage: ubuntu-latest -variables: - GOBIN: '$(GOPATH)/bin' # Go binaries path - GOROOT: '/usr/local/go1.11' # Go installation path - GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path - modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code steps: -- script: | - mkdir -p '$(GOBIN)' - mkdir -p '$(GOPATH)/pkg' - mkdir -p '$(modulePath)' - shopt -s extglob - shopt -s dotglob - mv !(gopath) '$(modulePath)' - 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 - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - go build -v . - workingDirectory: '$(modulePath)' - displayName: 'Get dependencies, then build' - +- task: GoTool@0 + inputs: + version: '1.13.5' +- task: Go@0 + inputs: + command: 'get' + arguments: '-d' + workingDirectory: '$(System.DefaultWorkingDirectory)' - task: CmdLine@2 name: Build inputs: