Commit 988faa34 authored by Robert Knight's avatar Robert Knight

Skip builds of automated commits on Jenkins

As part of the deployment process Jenkins creates a new commit on master
in order to bump the npm package version.

There is no point in creating an automated build of these commits, which
can be identified by the commiter name.
parent e86fa4a0
...@@ -26,6 +26,16 @@ node { ...@@ -26,6 +26,16 @@ node {
npmTag = "prerelease" npmTag = "prerelease"
} }
lastCommitAuthor = sh (
script: 'git show HEAD --no-patch --format="%an"',
returnStdout: true
).trim()
if (lastCommitAuthor == "jenkins-hypothesis") {
echo "Skipping build of automated commit created by Jenkins"
return
}
pkgName = sh ( pkgName = sh (
script: 'cat package.json | jq -r .name', script: 'cat package.json | jq -r .name',
returnStdout: true returnStdout: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment