Skip to content
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

introduce go.mod for env2yaml #15921

Merged
merged 1 commit into from
Feb 8, 2024
Merged

introduce go.mod for env2yaml #15921

merged 1 commit into from
Feb 8, 2024

Conversation

jsvd
Copy link
Member

@jsvd jsvd commented Feb 8, 2024

Updated the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.

Tested locally and also with buildkite build docker image:

> curl https://artifacts-snapshot.elastic.co/logstash/8.13.0-37a00f62/downloads/logstash/logstash-8.13.0-SNAPSHOT-docker-image-aarch64.tar.gz | docker load

❯ docker run -e PIPELINE_WORKERS -it  docker.elastic.co/logstash/logstash:8.13.0-SNAPSHOT grep build_sha logstash-core/lib/logstash/build.rb
BUILD_INFO = {"build_date"=>"2024-02-08T11:58:19+00:00", "build_sha"=>"7465a35f681caa57b60d49512b0d22111e36bad6", "build_snapshot"=>true}

❯ PIPELINE_WORKERS=2  docker run -e PIPELINE_WORKERS -it  docker.elastic.co/logstash/logstash:8.13.0-SNAPSHOT echo 1
2024/02/08 13:11:43 Setting 'pipeline.workers' from environment.
1

fixes #15920

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@jsvd jsvd marked this pull request as ready for review February 8, 2024 13:09
@dliappis dliappis requested review from andsel and dliappis February 8, 2024 13:14
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

Copy link
Contributor

@mashhurs mashhurs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jsvd jsvd merged commit 5c3e64d into elastic:main Feb 8, 2024
5 checks passed
@jsvd
Copy link
Member Author

jsvd commented Feb 8, 2024

@logstashmachine backport 8.12

@jsvd jsvd deleted the env2yaml_gomodule branch February 8, 2024 18:12
github-actions bot pushed a commit that referenced this pull request Feb 8, 2024
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.

(cherry picked from commit 5c3e64d)
jsvd added a commit that referenced this pull request Feb 8, 2024
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.

(cherry picked from commit 5c3e64d)

Co-authored-by: João Duarte <[email protected]>
@jsvd
Copy link
Member Author

jsvd commented Feb 8, 2024

@logstashmachine backport 7.17

github-actions bot pushed a commit that referenced this pull request Feb 8, 2024
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.

(cherry picked from commit 5c3e64d)
jsvd added a commit that referenced this pull request Feb 8, 2024
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.

(cherry picked from commit 5c3e64d)

Co-authored-by: João Duarte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants