Hi all, for extracting a git revision and building a timestamp at the beginning of a job I have now the following code:
stage 'build' node { git '....' sh 'xy=`git rev-parse HEAD | cut -c1-11`; echo -n $xy > git-revision' def rev11 = readFile 'git-revision' echo "Git revision ${rev11}" def stamp = new java.text.SimpleDateFormat('yyyyMMddHHmmss').format(new Date()) echo stamp ... } At least building the git revision seams quite complicated. It would be great when the git SCM plugin sets the revision as a variable. Is there a more crispy solution for this? Cheers, Jens -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e4bdb5bb-6d1e-4459-8e1c-03483e2a945a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.