Created
September 11, 2019 08:13
-
-
Save ridakk/ed9ad67d6dad0cb54663cde1a41dfbb2 to your computer and use it in GitHub Desktop.
git add & commit if there are changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage('commit if changed') { | |
sh 'git diff --quiet && git diff --staged --quiet || git commit -am "chore: commit pipeline changes"' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment