diff --git a/.github/workflows/check-watchdog.yaml b/.github/workflows/check-watchdog.yaml index 3e8d7c4..5878870 100644 --- a/.github/workflows/check-watchdog.yaml +++ b/.github/workflows/check-watchdog.yaml @@ -20,14 +20,7 @@ jobs: - name: Check for modifications in the watchdog function run: | set -x - MODIFIED_LINES=$(git diff --unified=0 master ${{ github.head_ref }} Jenkinsfile | grep 'void watchdog()') - - # Debug: Print the entire git diff output for Jenkinsfile - echo "Full git diff output for Jenkinsfile:" - git diff --unified=0 master issue-325-gopreprocess Jenkinsfile - echo "-------------------------" - - if [[ ! -z "$MODIFIED_LINES" ]]; then + if $(git diff --unified=0 master ${{ github.head_ref }} Jenkinsfile | grep 'void watchdog()'); then echo "ERROR: The watchdog function in the Jenkinsfile has been modified." exit 1 else diff --git a/Jenkinsfile b/Jenkinsfile index 2760f46..9b5488f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1477,7 +1477,7 @@ pipeline { void watchdog() { if( BRANCH_NAME != 'master' && TARGET_BUCKET == 'go-data-product-experimental'){ echo 'Only master can touch that target.' - sh '`exit -1`' erterterter + sh '`exit -1`' }else if( BRANCH_NAME != 'snapshot' && TARGET_BUCKET == 'go-data-product-snapshot'){ echo 'Only master can touch that target.' sh '`exit -1`'