I am fairly new with Jenkins and Git and I am still trying to figure out how to use the jenkins declarative pipeline script. I also have very minimal programming background so the groovy script is a bit new to me.
In my declarative pipeline script, I want to be able to fetch all of my git tags and descriptions while pulling the repository in the jenkins build process.
Currently what i have is this:
stage ('get_repo') {
checkout([$class: 'GitSCM',
branches: [[name: '*/rc']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'git',
url: 'git@bitbucket.org:myrepo/myrepo.git']]])
}
I am not sure what I should add. Thanks in advance!