From f7289c4005acc7a5550cd9fe5551d6dc2f24a397 Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 9 Sep 2023 20:04:24 +0000 Subject: [PATCH 1/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.golangci.yml" Made with ❤️️ by updatecli --- .golangci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 27ef981e..b6539db0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -83,7 +83,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.20.8" nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 @@ -117,19 +117,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.20.8" # https://staticcheck.io/docs/options#checks checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.20.8" # https://staticcheck.io/docs/options#checks checks: ["all"] unused: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.20.8" gosec: excludes: From 03d42701f69d76c485c1f9950bc6e09f04956760 Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 9 Sep 2023 20:04:26 +0000 Subject: [PATCH 2/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.go-version" Made with ❤️️ by updatecli --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index 8909929f..95393fc7 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.7 +1.20.8 From a19f02768076ff1a988b51a67ebfd153b8d36f27 Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 7 Oct 2023 20:04:22 +0000 Subject: [PATCH 3/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.go-version" Made with ❤️️ by updatecli --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index 95393fc7..20538953 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.8 +1.20.9 From 75173dabcb073edd8bbec29447d2f0ff36cce60d Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 7 Oct 2023 20:04:24 +0000 Subject: [PATCH 4/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.golangci.yml" Made with ❤️️ by updatecli --- .golangci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b6539db0..a628b436 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -83,7 +83,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.20.8" + go: "1.20.9" nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 @@ -117,19 +117,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.8" + go: "1.20.9" # https://staticcheck.io/docs/options#checks checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.8" + go: "1.20.9" # https://staticcheck.io/docs/options#checks checks: ["all"] unused: # Select the Go version to target. The default is '1.13'. - go: "1.20.8" + go: "1.20.9" gosec: excludes: From c37c51f8f994121d543b79a2463bb40e39c5d2c7 Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 14 Oct 2023 20:04:18 +0000 Subject: [PATCH 5/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.golangci.yml" Made with ❤️️ by updatecli --- .golangci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a628b436..247a210e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -83,7 +83,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.20.9" + go: "1.20.10" nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 @@ -117,19 +117,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.9" + go: "1.20.10" # https://staticcheck.io/docs/options#checks checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.9" + go: "1.20.10" # https://staticcheck.io/docs/options#checks checks: ["all"] unused: # Select the Go version to target. The default is '1.13'. - go: "1.20.9" + go: "1.20.10" gosec: excludes: From 56441a2f393c2fb146847bf12f7046bbccb7d7fe Mon Sep 17 00:00:00 2001 From: apmmachine Date: Sat, 14 Oct 2023 20:04:20 +0000 Subject: [PATCH 6/8] chore: Updated the content of the file "/tmp/updatecli/github/elastic... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /elastic-agent-libs/.go-version" Made with ❤️️ by updatecli --- .go-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.go-version b/.go-version index 20538953..acdfc793 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.9 +1.20.10 From 8715f15391c2f14cfa86dc61d3b5a8e4ab9561b6 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 8 Nov 2023 10:49:12 +0100 Subject: [PATCH 7/8] buildkite: pre-command hook for Windows To setup the goversion --- .buildkite/hooks/pre-command.ps1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 .buildkite/hooks/pre-command.ps1 diff --git a/.buildkite/hooks/pre-command.ps1 b/.buildkite/hooks/pre-command.ps1 new file mode 100644 index 00000000..de1a1f9d --- /dev/null +++ b/.buildkite/hooks/pre-command.ps1 @@ -0,0 +1 @@ +$env:GO_VERSION = Get-Content -Path .go-version From 26b62ebe91ed8627bb564f8b9816fa556835d586 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 8 Nov 2023 11:01:38 +0100 Subject: [PATCH 8/8] similarly done in https://github.com/elastic/elastic-agent/blob/29386eb727f7644824de1119aef4c8be5eadeb50/.buildkite/hooks/pre-command.ps1\#L6 --- .buildkite/hooks/pre-command.ps1 | 14 ++++++++++++++ .buildkite/scripts/test.ps1 | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.buildkite/hooks/pre-command.ps1 b/.buildkite/hooks/pre-command.ps1 index de1a1f9d..75ae8bec 100644 --- a/.buildkite/hooks/pre-command.ps1 +++ b/.buildkite/hooks/pre-command.ps1 @@ -1 +1,15 @@ $env:GO_VERSION = Get-Content -Path .go-version + +# Install gvm and go +# TODO: Move GVM download to the base VM image +$env:GvmVersion = "0.5.2" +[Net.ServicePointManager]::SecurityProtocol = "tls12" +$env:GoVersion = Get-Content -Path .go-version +Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v$env:GvmVersion/gvm-windows-amd64.exe -Outfile C:\Windows\System32\gvm.exe +gvm --format=powershell $env:GO_VERSION | Invoke-Expression +go version + +$GOPATH = $(go env GOPATH) +$env:Path = "$GOPATH\bin;" + $env:Path +[Environment]::SetEnvironmentVariable("GOPATH", "$GOPATH", [EnvironmentVariableTarget]::Machine) +[Environment]::SetEnvironmentVariable("Path", "$GOPATH\bin;$env:Path", [EnvironmentVariableTarget]::Machine) diff --git a/.buildkite/scripts/test.ps1 b/.buildkite/scripts/test.ps1 index 7a97d512..f4046f95 100755 --- a/.buildkite/scripts/test.ps1 +++ b/.buildkite/scripts/test.ps1 @@ -8,16 +8,6 @@ function fixCRLF { git reset --quiet --hard } -function withGolang($version) { - Write-Host "-- Install golang --" - choco install -y golang --version $version - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv - go version - go env -} - function withGoJUnitReport { Write-Host "-- Install go-junit-report --" go install github.com/jstemmer/go-junit-report/v2@latest @@ -25,7 +15,6 @@ function withGoJUnitReport { Write-Host "--- Prepare enviroment" fixCRLF -withGolang $env:GO_VERSION withGoJUnitReport Write-Host "--- Run test"