On GitLab, use the project-internal pipeline ID as build number
I think the CI_PIPELINE_IID
is the best substitute for the build number on Jenkins. It's incremental and it's per-project which means it's much lower than the global CI_PIPELINE_ID
. Moreover, it's shared by all jobs running for a pipeline, so that all artifacts created by the pipeline get the same "build number".
https://invent.kde.org/help/ci/variables/predefined_variables.md