-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST: bump go version to 1.23 #42960
Changes from all commits
e9a9934
b71ef7b
e8ad450
5e84968
48b9fe0
53a6f98
f501c58
747f315
a19bfa8
def7f30
fa109dc
9b5e2df
45cbfd3
81b304e
a40e525
aa3466d
e1e84f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Centralise the mage package for a given beat in Buildkite. | ||
# It enables multi-arch builds to avoid the exec format errors when | ||
# attempting to build arm64 inside arm64 workers. | ||
# For further details, see https://github.com/elastic/elastic-agent/pull/6948 | ||
# and https://github.com/elastic/golang-crossbuild/pull/507 | ||
# | ||
|
||
set -ueo pipefail | ||
|
||
|
||
BEAT_DIR=${1:?-"Error: Beat directory must be specified."} | ||
|
||
#Use newer multiarch support for packaging | ||
docker run --privileged --rm tonistiigi/binfmt:master --install all | ||
# shellcheck source=/dev/null | ||
source .buildkite/scripts/qemu.sh | ||
|
||
cd $BEAT_DIR | ||
mage package |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specific script that can be used in other places |
||
# | ||
# It enables multi-arch builds to avoid the exec format errors when | ||
# attempting to build arm64 inside arm64 workers. | ||
# | ||
# For further details, see https://github.com/elastic/elastic-agent/pull/6948 | ||
# and https://github.com/elastic/golang-crossbuild/pull/507 | ||
# | ||
set -euo pipefail | ||
|
||
if [[ "$(uname -m)" == "aarch64" || "$(uname -m)" == "arm64" ]]; then | ||
echo "Skipping qemu installation on arm64 worker" | ||
else | ||
BINFMT_IMAGE="tonistiigi/binfmt:qemu-v9.2.2" | ||
|
||
# Make sure to uninstall first to avoid conflicts | ||
docker run --privileged --rm "$BINFMT_IMAGE" --uninstall qemu-* | ||
docker run --privileged --rm "$BINFMT_IMAGE" --install all | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ steps: | |
- label: ":ubuntu: x-pack/dockerlogbeat: Ubuntu x86_64 Unit Tests" | ||
key: "mandatory-linux-unit-test" | ||
command: | | ||
source .buildkite/scripts/qemu.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unitTest uses the golang-crossbuild hence we need to use qemu |
||
cd x-pack/dockerlogbeat | ||
mage build unitTest | ||
retry: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.22.12 | ||
1.23.6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22.12 | ||
FROM golang:1.23.6 | ||
|
||
RUN \ | ||
apt-get update \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,9 @@ | |
fpmVersion = "1.13.1" | ||
|
||
// Docker images. See https://github.com/elastic/golang-crossbuild. | ||
beatsFPMImage = "docker.elastic.co/beats-dev/fpm" | ||
beatsFPMImage = "docker.elastic.co/observability-ci/fpm" | ||
// BeatsCrossBuildImage is the image used for crossbuilding Beats. | ||
BeatsCrossBuildImage = "docker.elastic.co/beats-dev/golang-crossbuild" | ||
BeatsCrossBuildImage = "docker.elastic.co/observability-ci/golang-crossbuild" | ||
Comment on lines
-44
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't be needed as soon as we merge elastic/golang-crossbuild#527 |
||
|
||
elasticBeatsImportPath = "github.com/elastic/beats" | ||
|
||
|
@@ -452,7 +452,7 @@ | |
|
||
panic(fmt.Errorf("magefile must call devtools.SetBuildVariableSources() "+ | ||
"because it is not an elastic beat (repo=%+v)", repo.RootImportPath)) | ||
} | ||
|
||
// BuildVariableSources is used to explicitly define what files contain build | ||
// variables and how to parse the values from that file. This removes ambiguity | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/elastic/beats/v7 | ||
|
||
go 1.22.12 | ||
go 1.23.6 | ||
|
||
require ( | ||
cloud.google.com/go/bigquery v1.65.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22.12 | ||
FROM golang:1.23.6 | ||
|
||
RUN \ | ||
apt-get update \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22.12 | ||
FROM golang:1.23.6 | ||
|
||
COPY test/main.go main.go | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22.12 | ||
FROM golang:1.23.6 | ||
|
||
RUN \ | ||
apt-get update \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crosscompile uses the golang-crossbuild hence we need to use qemu