Skip to content
Snippets Groups Projects
avatar
smartdatalab/public/ci-cd-components/golang
Go 4.13.0

gitlab-ci-golang

include:
  - component: $CI_SERVER_FQDN/smartdatalab/public/ci-cd-components/golang/gitlab-ci-golang@4.13.0
Inputs
Name
Mandatory
Type
Description
Default
imagefalsestringThe Docker image used to run Go (build+test or build only) - **set the version required by your project**registry.hub.docker.com/library/golang:bookworm
goproxyfalsestringURL of Go module proxy (see [Go env](https://golang.org/cmd/go/#hdr-Environment_variables))
list-argsfalsestringArguments used by the list commandlist -u -m -mod=readonly -json all
sbom-optsfalsestring[@cyclonedx/cyclonedx-gomod options](https://github.com/CycloneDX/cyclonedx-gomod#usage) used for SBOM analysis-main .
target-osfalsestringThe `$GOOS` target [see available values](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) Fallbacks to default `$GOOS` from the Go Docker image
build-modefalsestringThe template build mode (accepted values are `application`, `modules` and `auto`)auto
sbom-imagefalsestringSpecific Docker image used to run cyclonedx-gomod$GO_IMAGE
test-flagsfalsestringFlags used by the [go test command](https://pkg.go.dev/cmd/go#hdr-Test_packages)-mod=readonly -v -race
test-imagefalsestringSpecific Docker image used to run Go tests (as a separate job)
build-flagsfalsestringFlags used by the [go build command](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies)-mod=readonly
project-dirfalsestringGo project root directory.
target-archfalsestringThe `$GOARCH` target [see available values](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) Fallbacks to default `$GOARCH` from the Go Docker image
ci-lint-argsfalsestring`golangci-lint` [command line arguments](https://github.com/golangci/golangci-lint#command-line-options)-E gosec ./...
semgrep-argsfalsestringSemgrep [scan options](https://semgrep.dev/docs/cli-reference#semgrep-scan-command-options)--metrics off --disable-version-check
ci-lint-imagefalsestringThe Docker image used to run `golangci-lint`registry.hub.docker.com/golangci/golangci-lint:latest-alpine
sbom-disabledfalsebooleanDisable Software Bill of Materials
semgrep-imagefalsestringThe Docker image used to run [Semgrep](https://semgrep.dev/docs/)registry.hub.docker.com/semgrep/semgrep:latest
semgrep-rulesfalsestringSpace-separeted list of [Semgrep rules](https://semgrep.dev/docs/running-rules). Can be both local YAML files or remote rules from the [Semgrep Registry](https://semgrep.dev/explore) (denoted by the `p/` prefix)p/golang p/gosec
test-packagesfalsestringPackages to test with the [go test command](https://pkg.go.dev/cmd/go#hdr-Test_packages)./...
build-packagesfalsestringPackages to build with the [go build command](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies)./...
vulncheck-argsfalsestring`govulncheck` [command line arguments](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck#hdr-Flags)./...
cobertura-flagsfalsestringBuild flags to add to use gocover-cobertura, leave blank if not needed
ci-lint-disabledfalsebooleanDisable GolangCI-Lint
generate-modulesfalsestringSpace separated list of Go code generator modules (ex: `stringer mockery`)
go-sbom-job-tagsfalsearraytags to filter applicable runners for go-sbom job[]
go-test-job-tagsfalsearraytags to filter applicable runners for go-test job[]
semgrep-disabledfalsebooleanDisable Semgrep
go-build-job-tagsfalsearraytags to filter applicable runners for go-build job[]
mod-outdated-argsfalsestring`god-mod-outdated` [command line arguments](https://github.com/psampaz/go-mod-outdated#usage-update -direct
build-linker-flagsfalsestringLinker flags used by the [go build command](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies) `-ldflags`-s -w
vulncheck-disabledfalsebooleanDisable Govulncheck
go-ci-lint-job-tagsfalsearraytags to filter applicable runners for go-ci-lint job[]
go-generate-job-tagsfalsearraytags to filter applicable runners for go-generate job[]
go-build-test-job-tagsfalsearraytags to filter applicable runners for go-build-test job[]
go-govulncheck-job-tagsfalsearraytags to filter applicable runners for go-govulncheck job[]
go-mod-outdated-job-tagsfalsearraytags to filter applicable runners for go-mod-outdated job[]
semgrep-download-rules-enabledfalsebooleanDownload Semgrep remote rulestrue