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

feat(fips): add apm-server-fips target and refactor make build task #16015

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Mar 5, 2025

Motivation/summary

add apm-server-fips with CGO enabled and requirefips tag
fix make apm-server on windows
fix building windows binary on non-windows GOOS
use consistent build args for oss and fips build command

bonus: you can now pass any GOOS/GOARCH to make apm-server to build on any platform supported by golang

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

fips target:

  • make apm-server-fips

non-fips targets:

  • make apm-server-oss
  • make apm-server

packaging targets:

  • make build/apm-server-linux-amd64
  • make build/apm-server-linux-arm64
  • make build/apm-server-darwin-amd64
  • make build/apm-server-darwin-arm64
  • make build/apm-server-windows-amd64.exe

Related issues

Related to #15876

add apm-server-fips with CGO enabled and requirefips tag
fix make apm-server on windows
fix building windows binary on non-windows GOOS
use consistent build args for oss and fips build command
@kruskall kruskall requested a review from a team as a code owner March 5, 2025 13:44
@kruskall kruskall added backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Mar 5, 2025
kruskall added 2 commits March 5, 2025 15:00
build apm-server-bin then rename it to the actual os-specific name
apm-server-fips: CGO_ENABLED=1
apm-server apm-server-oss: CGO_ENABLED=0

apm-server-fips: GOTAGS=-tags=requirefips
Copy link
Member Author

Choose a reason for hiding this comment

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

for now a fips build is only passing -tags=requirefips.

GODEBUG/GOFIPS/etc. are coming in a followup PR

kruskall added 2 commits March 5, 2025 18:48
make won't rerun a prerequisite each time if multiple targets
are passed and they depend on the same target
make won't rerun a prerequisite each time if multiple targets
are passed and they depend on the same target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants