Skip to content

Instantly share code, notes, and snippets.

@rlespinasse
Last active September 18, 2018 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlespinasse/354e0eee17029515b45292227eae6a92 to your computer and use it in GitHub Desktop.
Save rlespinasse/354e0eee17029515b45292227eae6a92 to your computer and use it in GitHub Desktop.
'[ci skip]' feature on github
#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('Project Build') {
when {
beforeAgent true
not { changelog '.*\\[ci skip\\].*' }
}
stages {
stage('Prepare version') {
when { branch 'master' }
steps {
echo 'Bump your project version'
echo 'Commit it with "[ci skip]" string in the commit message'
echo 'Tag it'
}
}
stage('Build version') {
steps {
echo 'Build your project upon this new commit'
}
}
stage('Publish project and version') {
when { branch 'master' }
steps {
echo 'Publish your project'
echo 'Push your new commit and tag'
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment