Fix fips builds for Golang 1.19
What does this MR do?
Updates the go build environment to include an extra flag for fips mode on newer golang versions.
Testing
You can use a ubi fips docker image we build for gitaly for testing:
Golang 1.19 fips registry.gitlab.com/gitlab-org/gitlab-build-images/ubi-8.6-ruby-3.0-golang-1.19-rust-1.65:git-2.36
Golang 1.18 fips registry.gitlab.com/gitlab-org/gitlab-build-images/ubi-8.6-ruby-3.0-golang-1.18-rust-1.65:git-2.36
- Clone and cd into this branch
- Run
export FIPS_MODE=1
- Run
make build
- Should succeed with
binary is correctly built in FIPS mode
- Should succeed with
- Run
make test
Both 1.19 and 1.18 should succeed
TODO
-
Feature flag
-
Added feature flag: -
This feature does not require a feature flag
-
-
I added the Changelog
trailer to the commits that need to be included in the changelog (e.g.Changelog: added
) -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines