Skip to content

Commit 7197a9e

Browse files
authored
Update Jenkinsfile
1 parent 35a0f21 commit 7197a9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ pipeline {
4141
git credentialsId: 'gh-cred', url: 'https://github.com/lenn0n/jenkins-post-build.git'
4242
bat "echo 'node_modules' > .gitignore"
4343
bat 'git add .'
44-
bat "git commit -m 'Commit from Jenkins' || true"
45-
bat "git push -u origin HEAD:master || true"
44+
// Watch out of using || true
45+
bat 'git commit -m "Commit from Jenkins" || echo "Nothing added."'
46+
bat 'git push -u origin HEAD:master || echo "Nothing pushed."'
4647
}
4748
}
4849
}

0 commit comments

Comments
 (0)