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

Additional Go Build flags in go/build pipeline #821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

debasishbsws
Copy link
Member

Fixes: #474
cc @developer-guy

This provides an additional option for go/build pipeline. as described in issue #474, If we want to pass additional flags like -gcflags for memory optimization or -mod=vendor or -mod=mod etc we can't do that via current pipeline.

Uses:

  - uses: go/build
    with:
      modroot: build-dir
      tags: enterprise
      packages: ./main.go
      output: hello
      flags: -mod=vendor -gcflags="-m=2"  # <-- additional any custom options we want to specify for go build.

Functional Changes

  • This change can build all of Wolfi without errors (describe results in notes)

Notes:
It will not affect any previous build but just going to give more flexibility in using go/build pipeline

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes:

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

Signed-off-by: debasishbsws <debasishbsws.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add an option for go flags in go/build pipeline
1 participant