GitLab offers many predefined variables
Most describe the current job, stage and pipeline
Some describe the GitLab server
Some help interacting with the GitLab server
variables
directiveUpdate build command:
go build \
-ldflags "-X main.Version=${CI_COMMIT_REF_NAME}" \
-o hello \
.