From a5e887320b6d68816a3c2338f6afccc1d9dae6a3 Mon Sep 17 00:00:00 2001 From: Jared Jacobson <71237599+jaredjn@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:55:23 +1000 Subject: [PATCH 1/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 876ef9f29..d558b0992 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,19 +16,27 @@ variables: modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code steps: -# - task: CmdLine@2 -# displayName: 'List all directories' -# inputs: -# script: | -# echo "Structure of work folder of this pipeline:" -# tree $(Agent.WorkFolder) /f -# echo "Build.ArtifactStagingDirectory:" -# echo "$(Build.ArtifactStagingDirectory)" -# echo "Build.BinariesDirectory:" -# echo "$(Build.BinariesDirectory)" -# echo "Build.SourcesDirectory:" -# echo "$(Build.SourcesDirectory)" -# tree $(Build.SourcesDirectory) /f +- 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: CmdLine@2 name: Build From 277af95b36a9b6103a156a395d6641640a113dbe Mon Sep 17 00:00:00 2001 From: Jared Jacobson <71237599+jaredjn@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:58:20 +1000 Subject: [PATCH 2/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) 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: From 3ef16f660e3e2469a6276aa516b4e6e290d11274 Mon Sep 17 00:00:00 2001 From: Jared Jacobson <71237599+jaredjn@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:00:30 +1000 Subject: [PATCH 3/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 05f995c49..5c1a7eb6c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,11 +14,6 @@ steps: - 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: