Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add load utils.groovy existence in pipelines #93

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading