Skip to content

Commit 5f66c47

Browse files
authored
Add Go 1.19 to test matrix (Azure#18805)
* Add Go 1.19 to test matrix Update to latest golangci-lint to support Go 1.19. Update Go 1.18 to latest patch version. * remove trailing .0 * lint clean * more lint clean
1 parent ab0102e commit 5f66c47

37 files changed

+211
-196
lines changed

eng/pipelines/mgmt-auto-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ stages:
2323

2424
- task: GoTool@0
2525
inputs:
26-
version: '1.18.2'
26+
version: '1.19'
2727

2828
- task: ShellScript@2
2929
inputs:
3030
scriptPath: 'eng/scripts/mgmt-auto-release.sh'
3131
cwd: '$(System.DefaultWorkingDirectory)'
32-
args: '$(azuresdk-github-pat)'
32+
args: '$(azuresdk-github-pat)'

eng/pipelines/templates/jobs/archetype-sdk-client-samples.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ stages:
1818
Linux_Go118:
1919
pool.name: azsdk-pool-mms-ubuntu-2004-general
2020
image.name: MMSUbuntu20.04
21-
go.version: '1.18.2'
21+
go.version: '1.18.5'
2222
Windows_Go118:
2323
pool.name: azsdk-pool-mms-win-2019-general
2424
image.name: MMS2019
25-
go.version: '1.18.2'
25+
go.version: '1.18.5'
26+
Linux_Go119:
27+
pool.name: azsdk-pool-mms-ubuntu-2004-general
28+
image.name: MMSUbuntu20.04
29+
go.version: '1.19'
30+
Windows_Go119:
31+
pool.name: azsdk-pool-mms-win-2019-general
32+
image.name: MMS2019
33+
go.version: '1.19'
2634
pool:
2735
name: $(pool.name)
2836
vmImage: $(image.name)
@@ -55,7 +63,7 @@ stages:
5563
steps:
5664
- task: GoTool@0
5765
inputs:
58-
version: '1.18.2'
66+
version: '1.19'
5967
displayName: "Select Go Version"
6068

6169
- template: ../steps/create-go-workspace.yml

eng/pipelines/templates/jobs/archetype-sdk-client.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,20 @@ stages:
8585
Linux_Go118:
8686
pool.name: azsdk-pool-mms-ubuntu-2004-general
8787
image.name: MMSUbuntu20.04
88-
go.version: '1.18.2'
88+
go.version: '1.18.5'
8989
Windows_Go118:
9090
pool.name: azsdk-pool-mms-win-2019-general
9191
image.name: MMS2019
92-
go.version: '1.18.2'
92+
go.version: '1.18.5'
93+
generate.bom: true
94+
Linux_Go119:
95+
pool.name: azsdk-pool-mms-ubuntu-2004-general
96+
image.name: MMSUbuntu20.04
97+
go.version: '1.19'
98+
Windows_Go119:
99+
pool.name: azsdk-pool-mms-win-2019-general
100+
image.name: MMS2019
101+
go.version: '1.19'
93102
generate.bom: true
94103
pool:
95104
name: $(pool.name)
@@ -133,7 +142,7 @@ stages:
133142

134143
- task: GoTool@0
135144
inputs:
136-
version: '1.18.2'
145+
version: '1.19'
137146
displayName: "Select Go Version"
138147

139148
- template: ../steps/create-go-workspace.yml

eng/pipelines/templates/jobs/archetype-sdk-eng-client.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,20 @@ stages:
2828
Linux_Go118:
2929
pool.name: azsdk-pool-mms-ubuntu-2004-general
3030
image.name: MMSUbuntu20.04
31-
go.version: '1.18.2'
31+
go.version: '1.18.5'
3232
Windows_Go118:
3333
pool.name: azsdk-pool-mms-win-2019-general
3434
image.name: MMS2019
35-
go.version: '1.18.2'
35+
go.version: '1.18.5'
36+
generate.bom: true
37+
Linux_Go119:
38+
pool.name: azsdk-pool-mms-ubuntu-2004-general
39+
image.name: MMSUbuntu20.04
40+
go.version: '1.19'
41+
Windows_Go119:
42+
pool.name: azsdk-pool-mms-win-2019-general
43+
image.name: MMS2019
44+
go.version: '1.19'
3645
generate.bom: true
3746
pool:
3847
name: $(pool.name)
@@ -71,7 +80,7 @@ stages:
7180

7281
- task: GoTool@0
7382
inputs:
74-
version: '1.18.2'
83+
version: '1.19'
7584
displayName: "Select Go Version"
7685

7786
- template: ../steps/create-go-workspace.yml

eng/pipelines/templates/jobs/mgmt-mock-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
displayName: 'Install autorest'
1515
- task: GoTool@0
1616
inputs:
17-
version: '1.18.2'
17+
version: '1.19'
1818
displayName: "Select Go Version"
1919

2020
- template: /eng/pipelines/templates/steps/create-go-workspace.yml

eng/pipelines/templates/variables/globals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
2-
GoLintCLIVersion: 'v1.47.1'
2+
GoLintCLIVersion: 'v1.48.0'
33
Package.EnableSBOMSigning: true
44
# Enable go native component governance detection
55
# https://docs.opensource.microsoft.com/tools/cg/index.html

eng/scripts/automation_init.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ outputFile="$(realpath $outputFile)"
1717
echo "output json file: $outputFile"
1818

1919
TMPDIR="/tmp"
20-
if [ ! "$(go version | awk '{print $3}' | cut -c 3-6)" = "1.18" ]
20+
if [ ! "$(go version | awk '{print $3}' | cut -c 3-6)" = "1.19" ]
2121
then
22-
wget https://golang.org/dl/go1.18.linux-amd64.tar.gz
23-
tar -C $TMPDIR -xzf go1.18.linux-amd64.tar.gz
22+
wget https://golang.org/dl/go1.19.linux-amd64.tar.gz
23+
tar -C $TMPDIR -xzf go1.19.linux-amd64.tar.gz
2424
export GOROOT=$TMPDIR/go
2525
export PATH=$GOROOT/bin:$PATH
2626
fi

eng/tools/generator/autorest/writer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ func NewWriterFromFile(file string) *Writer {
3939
}
4040
}
4141

42-
//
4342
// Write writes the new version changelog to the changelog file, also modify the links in the previous version
4443
func (w *Writer) Write(r *report.PkgsReport) error {
4544
// first we read the changelog, get the lines as an array

eng/tools/generator/cmd/template/templateCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func BindFlags(flagSet *pflag.FlagSet) {
6060
flagSet.String("commit", "", "Specifies the commit hash of azure-rest-api-specs")
6161
flagSet.String("release-date", "", "Specifies the release date in changelog")
6262
flagSet.String("package-config", "", "Additional config for package")
63-
flagSet.String("go-version", "1.18", "Go version")
63+
flagSet.String("go-version", "1.19", "Go version")
6464
flagSet.String("package-version", "", "Specify the version number of this release")
6565
}
6666

eng/tools/generator/cmd/v2/automation/automationCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Command() *cobra.Command {
3131
return nil
3232
},
3333
RunE: func(cmd *cobra.Command, args []string) error {
34-
goVersion := "1.18"
34+
goVersion := "1.19"
3535
if len(args) == 3 {
3636
goVersion = args[2]
3737
}

0 commit comments

Comments
 (0)