Skip to content

Commit

Permalink
Add load utils.groovy existence in pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: mnokka-unikie <[email protected]>
  • Loading branch information
mnokka-unikie committed Nov 13, 2024
1 parent 335597a commit 9ce5221
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/format-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,22 @@ jobs:
- name: Install npm-groovy-lint
run: npm install -g [email protected]
- name: Fail if there are any errors
run: npm-groovy-lint --failon error .
run: npm-groovy-lint --failon error .
# Custom step to check for missing 'load "utils.groovy"' in specified files
- name: Check for missing imports
run: |
missing_import_files=$(grep -L 'load "utils.groovy"' \
fmo-os-main-pipeline.groovy \
ghaf-main-pipeline.groovy \
ghaf-nightly-pipeline.groovy \
ghaf-parallel-pipeline.groovy \
ghaf-pre-merge-pipeline.groovy \
ghaf-release-pipeline.groovy)
if [ -n "$missing_import_files" ]; then
echo "Error: The following files are missing 'load \"utils.groovy\"':"
echo "$missing_import_files"
exit 1
else
echo "All specified files contain 'load \"utils.groovy\"'."
fi

0 comments on commit 9ce5221

Please sign in to comment.