Skip to content
Snippets Groups Projects
Commit 58ccc6b7 authored by Graeme Gillies's avatar Graeme Gillies
Browse files

Move from static versioning to making it a variable consumers need to set

parent 2816471b
No related branches found
No related tags found
No related merge requests found
Pipeline #15442402 passed
Loading
Loading
@@ -93,9 +93,7 @@ Additional command line options for Goreleaser can be set using the `GORELEASER_
If you wish to use `goreleaser` to build your project in a way that is fips compliant, you will need to specify the following variables when using the `goreleaser` tasks from this repository
 
`FIPS_MODE`: This instructs the CI pipeline to use the gorelease job specifically for creating fips compliant releases
`GL_COMMON_CI_TASKS_DEFAULT_UBI_IMAGE_VERSION`: This is the image tag of the Red Hat UBI image to use when using goreleaser. Red Hat UBI is used instead of the standard goreleaser image as it is fips compliant.
`GO_FIPS_TAG`: This is the git tag of the [golang-fips/go](https://github.com/golang-fips/go) fork of golang to use with goreleaser for compiling the code. By using this fork of golang, the resulting binary
release should be fips compliant. Note that you should use a `GO_FIPS_TAG` that is the same version of go that you normally use
`GL_COMMON_CI_TASKS_VERSION`: This is needed so the right version of the goreleaser image we build in `common-ci-tasks` is used. Typically set to the same ref as you use on the `include` stanza for `goreleaser.yml`
 
An example
 
Loading
Loading
@@ -107,8 +105,7 @@ stages:
variables:
GL_ASDF_GORELEASER_VERSION: ...
FIPS_MODE: 1
GL_COMMON_CI_TASKS_DEFAULT_UBI_IMAGE_VERSION: 8.6-990
GO_FIPS_TAG: go1.18.7-2-openssl-fips
GL_COMMON_CI_TASKS_VERSION: v1.52.1 # datasource=gitlab-releases depName=gitlab-com/gl-infra/common-ci-tasks
 
include:
# build binary release artifacts with goreleaser
Loading
Loading
Loading
Loading
@@ -94,7 +94,7 @@ goreleaser-fips:
-e CI_SERVER_URL \
-e GL_ASDF_GORELEASER_VERSION \
${GORELEASER_DOCKER_EXTRA_ARGS:-} \
registry.gitlab.com/gitlab-com/gl-infra/common-ci-tasks/goreleaser-fips:v1.53.2 release --rm-dist ${GORELEASER_EXTRA_ARGS:-}
registry.gitlab.com/gitlab-com/gl-infra/common-ci-tasks/goreleaser-fips:${GL_COMMON_CI_TASKS_VERSION} release --rm-dist ${GORELEASER_EXTRA_ARGS:-}
after_script: |
cat <<-EOD
----------------------------------------------------------
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment