Skip to content

Commit

Permalink
Update CI to latest versions of Go (Azure#21450)
Browse files Browse the repository at this point in the history
Update golangci-lint to latest version.
  • Loading branch information
jhendrixMSFT committed Oct 5, 2023
1 parent 1da93a2 commit 9bbe526
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 43 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/mgmt-auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stages:

- task: GoTool@0
inputs:
version: '1.20'
version: '1.21.0'

- task: ShellScript@2
inputs:
Expand Down
18 changes: 9 additions & 9 deletions eng/pipelines/templates/jobs/archetype-sdk-client-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ stages:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.18.10'
Linux_Go119:
Linux_Go120:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.19.5'
Windows_Go119:
go.version: '1.20.7'
Windows_Go120:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.19.5'
Linux_Go120:
go.version: '1.20.7'
Linux_Go121:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.20'
Windows_Go120:
go.version: '1.21.0'
Windows_Go121:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.20'
go.version: '1.21.0'
pool:
name: $(pool.name)
vmImage: $(image.name)
Expand Down Expand Up @@ -71,7 +71,7 @@ stages:
steps:
- task: GoTool@0
inputs:
version: '1.20'
version: '1.21.0'
displayName: "Select Go Version"

- template: ../steps/create-go-workspace.yml
Expand Down
36 changes: 19 additions & 17 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,30 +82,32 @@ stages:
- template: /eng/pipelines/templates/variables/globals.yml
strategy:
matrix:
Linux_Go118:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.18.10'
Windows_Go118:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.18.10'
Linux_Go119:
${{ if eq(parameters.ExcludeGoNMinus2, false) }}:
Linux_Go118:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.18.10'
${{ if eq(parameters.ExcludeGoNMinus2, false) }}:
Windows_Go118:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.18.10'
Linux_Go120:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.19'
Windows_Go119:
go.version: '1.20.7'
Windows_Go120:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.19'
Linux_Go120:
go.version: '1.20.7'
Linux_Go121:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.20'
Windows_Go120:
go.version: '1.21.0'
Windows_Go121:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.20'
go.version: '1.21.0'
generate.bom: true
pool:
name: $(pool.name)
Expand Down Expand Up @@ -149,7 +151,7 @@ stages:

- task: GoTool@0
inputs:
version: '1.20'
version: '1.21.0'
displayName: "Select Go Version"

- template: ../steps/create-go-workspace.yml
Expand Down
18 changes: 9 additions & 9 deletions eng/pipelines/templates/jobs/archetype-sdk-eng-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ stages:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.18.10'
Linux_Go119:
Linux_Go120:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.19.5'
Windows_Go119:
go.version: '1.20.7'
Windows_Go120:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.19.5'
Linux_Go120:
go.version: '1.20.7'
Linux_Go121:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.20'
Windows_Go120:
go.version: '1.21.0'
Windows_Go121:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.20'
go.version: '1.21.0'
generate.bom: true
pool:
name: $(pool.name)
Expand Down Expand Up @@ -87,7 +87,7 @@ stages:

- task: GoTool@0
inputs:
version: '1.20'
version: '1.21.0'
displayName: "Select Go Version"

- template: ../steps/create-go-workspace.yml
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/mgmt-mock-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
displayName: 'Install autorest'
- task: GoTool@0
inputs:
version: '1.20'
version: '1.21.0'
displayName: "Select Go Version"

- template: /eng/pipelines/templates/steps/create-go-workspace.yml
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"GoVersion": [
"1.18.10",
"1.19.5",
"1.20"
"1.20.7",
"1.21.0"
]
}
}
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
GoLintCLIVersion: 'v1.52.2'
GoLintCLIVersion: 'v1.54.2'
Package.EnableSBOMSigning: true
# Enable go native component governance detection
# https://docs.opensource.microsoft.com/tools/cg/index.html
Expand Down
6 changes: 3 additions & 3 deletions eng/scripts/automation_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ outputFile="$(realpath $outputFile)"
echo "output json file: $outputFile"

TMPDIR="/tmp"
if [ ! "$(go version | awk '{print $3}' | cut -c 3-6)" = "1.20" ]
if [ ! "$(go version | awk '{print $3}' | cut -c 3-6)" = "1.21" ]
then
wget https://golang.org/dl/go1.20.linux-amd64.tar.gz
tar -C $TMPDIR -xzf go1.20.linux-amd64.tar.gz
wget https://golang.org/dl/go1.21.0.linux-amd64.tar.gz
tar -C $TMPDIR -xzf go1.21.0.linux-amd64.tar.gz
export GOROOT=$TMPDIR/go
export PATH=$GOROOT/bin:$PATH
fi
Expand Down

0 comments on commit 9bbe526

Please sign in to comment.