-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add load utils.groovy existence in pipelines
Signed-off-by: mnokka-unikie <[email protected]>
- Loading branch information
1 parent
335597a
commit 9ce5221
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |