Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
Jared Jacobson 2021-09-13 10:55:23 +10:00
parent 571777ede8
commit a5e887320b

View file

@ -16,19 +16,27 @@ variables:
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
steps: steps:
# - task: CmdLine@2 - script: |
# displayName: 'List all directories' mkdir -p '$(GOBIN)'
# inputs: mkdir -p '$(GOPATH)/pkg'
# script: | mkdir -p '$(modulePath)'
# echo "Structure of work folder of this pipeline:" shopt -s extglob
# tree $(Agent.WorkFolder) /f shopt -s dotglob
# echo "Build.ArtifactStagingDirectory:" mv !(gopath) '$(modulePath)'
# echo "$(Build.ArtifactStagingDirectory)" echo '##vso[task.prependpath]$(GOBIN)'
# echo "Build.BinariesDirectory:" echo '##vso[task.prependpath]$(GOROOT)/bin'
# echo "$(Build.BinariesDirectory)" displayName: 'Set up the Go workspace'
# echo "Build.SourcesDirectory:"
# echo "$(Build.SourcesDirectory)" - script: |
# tree $(Build.SourcesDirectory) /f 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: CmdLine@2 - task: CmdLine@2
name: Build name: Build