1
  • For my project we use git, Jenkins, and udeploy
  • On git occasionally we “tag” a commit, i.e. “release 1.0”
  • For each project, we have at least two Jenkins job, one that builds the “develop” branch and one for “master
  • On udeploy we sometimes deploy from develop and sometimes from master. The develop and master have different job numbers on Jenkins, one could be #14 and other #65. In udeploy > versions this jobs are identified as “ProjectName-ShortVersionOfGitCommit-JenkinsJobNumber” i.e. MyApp-bcc27g9-9. This is hard to read and identify, especially that we have several branches and Jenkins jobs.

How would I make the version more readable by changing it to “ProjectName-Branch-Tag-JenkinsJobNumber” where tag is optional, i.e. MyApp-develop-release1.1-9 or just MyApp-develop-9.

Sarah A
  • 1,185
  • 12
  • 27

1 Answers1

0

The 'Build Name Setter Plugin' and the 'Token Macro Plugin' allow to customize the name given to a build job based on virtually anything you can wish for. E.g:

${GIT_BRANCH}-${GIT_REVISION,length=8}-${ENV,var="BUILD_TYPE"}

(assuming you set an environment variable called BUILD_TYPE). Probably there's even a built-in variable which gives you the tag(s) which you can make use of.

https://wiki.jenkins-ci.org/display/JENKINS/Build+Name+Setter+Plugin

planetmaker
  • 5,884
  • 3
  • 28
  • 37