Thank you for your reply.
I did try what you had suggested, but it did not work. But i could be doing
something wrong as well.
Here is my step.
pipeline {
agent any
stages {
stage('Checkout') {
steps {
script {
git(url: 'ssh://my.git', branch: 'testing',
You want to do something like this:
def GIT_VER = sh(returnStdout: true, script: 'git tag... | tail -n1')
Each invocation of sh will have it's own environment space.
On Fri, Oct 19, 2018, 15:12 wrote:
> Hi,
> I have the following steps in my jenkinsfile that work pretty well with
>
Hi,
I have the following steps in my jenkinsfile that work pretty well with
$GIT_VER=some number in the following step only.
stage('Git Checkout') {
steps {
git(url: 'ssh://mygit/my.git', branch: 'develop')
sh '''export GIT_VER=$(git tag -l [0-9].* --points-at