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

Static stack support #495

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Static stack support #495

merged 2 commits into from
Oct 10, 2023

Conversation

robdimsdale
Copy link
Member

Summary

This PR adds support for the static stack out of the box. Specifically it sets: CGO_ENABLED=0 environment variable and -buildmode=default build flag when it detects it is running on the static stack.

It does not set these if the user has already set a -buildmode flag (e.g. via BP_GO_BUILD_FLAGS) on the assumption that if the user is setting this they want their value to be preserved even if the build fails.

Additionally, this PR provides all the builders in the integration test, to ensure we are getting coverage on all supported stacks. It also cleans up some unused integration config.

Use Cases

See paketo-buildpacks/go#770

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@robdimsdale robdimsdale requested a review from a team as a code owner October 5, 2023 19:08
@robdimsdale robdimsdale added the semver:minor A change requiring a minor version bump label Oct 5, 2023
@robdimsdale robdimsdale force-pushed the static-stack-support branch from 1189c0a to b23263c Compare October 5, 2023 19:10
- Add necessary flags/env for static linking.
- This was superseded by the introduction of testing against multiple
  builders, but was never removed.
@robdimsdale robdimsdale enabled auto-merge (rebase) October 10, 2023 15:29
@robdimsdale robdimsdale merged commit 54af0b6 into main Oct 10, 2023
11 checks passed
@robdimsdale robdimsdale deleted the static-stack-support branch October 10, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants