geneontology / pipeline

Declarative pipeline for the Gene Ontology.
https://build.geneontology.org/job/geneontology/job/pipeline/
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

fixes #145, add a GH action to check that watchdog code in Jenkinsfile is not bei… #340

Closed sierra-moxon closed 9 months ago

sierra-moxon commented 9 months ago

…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 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

kltm commented 9 months ago

This will automatically get "tested" when next scanned.