So my flow as it stands now.
1) Do some work
2) Happy with work
3) Tag a release (v1.0.1 for example)
4) Create a docker image
5) Publish to kubernetes.
In jenkins, I've gotten 4 and 5 working very nicely in pipelines, but it'll either work manually, or on every commit. I remember in freestyle builds, there was a way to say "only include certain branches/tags". Is there something like this in pipeline yet?
So for now I'm doing
stage('checkout') {
git credentialsId: '--credentials--', url: '---giturl---'
versionStr = sh(returnStdout: true, script: 'git tag | sort -V').trim().split("\n")[0]
sh "git checkout ${versionStr}"
}
Am I missing something? is there a better way of doing this?
Gavin