I did this because I have to start editing a test pipeline and I want to protect myself from doing damage to any PROD system.
fixes #145 by doing a diff between the PR'd branch (triggered on PR only) and master to see if it can find any git diff output in the watchdog function/code block.
if it finds a change within the watchdog function/code block, it will return an error status for this action report: ERROR: The watchdog function in the Jenkinsfile has been modified.
else, it will succeed and print watchdog OK. Going one step further and enabling the branch protection rule that all PRs must pass checks would cement this as a failure status for any changes to the Jenkins file.
to circumvent the action, we can do one of two things:
1) turn off branch protections again - so we can merge even with a failing check
2) just set the github action to no longer run on PR
…ng changed on PR
I did this because I have to start editing a test pipeline and I want to protect myself from doing damage to any PROD system.
fixes #145 by doing a diff between the PR'd branch (triggered on PR only) and master to see if it can find any
git diff
output in the watchdog function/code block.if it finds a change within the watchdog function/code block, it will return an error status for this action report:
ERROR: The watchdog function in the Jenkinsfile has been modified.
else, it will succeed and printwatchdog OK
. Going one step further and enabling the branch protection rule that all PRs must pass checks would cement this as a failure status for any changes to the Jenkins file.to circumvent the action, we can do one of two things: 1) turn off branch protections again - so we can merge even with a failing check 2) just set the github action to no longer run on PR