diff --git a/pkg/build/pipelines/go/build.yaml b/pkg/build/pipelines/go/build.yaml index ae926c689..aa334aef2 100644 --- a/pkg/build/pipelines/go/build.yaml +++ b/pkg/build/pipelines/go/build.yaml @@ -94,6 +94,13 @@ pipeline: - runs: | LDFLAGS="${{inputs.strip}} ${{inputs.ldflags}}" + # Make fips binaries have symbols table by default + case "${{inputs.go-package}}" in + *-fips*) + LDFLAGS="$(echo $LDFLAGS | sed 's/-s //g')" + ;; + esac + BASE_PATH="${{inputs.prefix}}/${{inputs.install-dir}}/${{inputs.output}}" # Take advantage of melange's buid cache for downloaded modules diff --git a/pkg/build/pipelines/go/install.yaml b/pkg/build/pipelines/go/install.yaml index e2dd816e6..9a50545c4 100644 --- a/pkg/build/pipelines/go/install.yaml +++ b/pkg/build/pipelines/go/install.yaml @@ -72,6 +72,13 @@ pipeline: LDFLAGS="${{inputs.strip}} ${{inputs.ldflags}}" VERSION="" + # Make fips binaries have symbols table by default + case "${{inputs.go-package}}" in + *-fips*) + LDFLAGS="$(echo $LDFLAGS | sed 's/-s //g')" + ;; + esac + # Installed binaries will be stored in a tmp dir export GOBIN=$(mktemp -d)