Currently we give artifact name as releasenumber-sprintnumber-jenkinsbuildnumber-SNAPSHOT.jar
But we are planning to map every commit tag to the version of artifact generated from build.
So, artifact name will be releasenumber-gittag-SNAPSHOT.jar
So, To make it more helpful at build-QA-release phase of pipelines,
what should git tag look like, when developer tags the commit?
These artifact names will be part of build.gradle or pom.xml in java build as dependencies.
I would be tempted to use the short sha from the git commit alongside the Jenkins build number. My reason is there are two parts to producing the same artefact:
On occasions I have seen a patch to the operating system on a build server cause a bug when re-building the same code. Therefore, by recording both the commit id (short sha from git) and the build id (build number from Jenkins) you can identify exactly where a build came from.