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

SRE-2507 common: do not report "Doc-only: true" for empty commit #446

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
// Then a second PR submitted to comment out the @Library line, and when it
// is landed, both PR branches can be deleted.
//@Library(value='pipeline-lib@my_branch_name') _
// TO BE REMOVED BEFORE LANDING
@Library(value="pipeline-lib@grom72/SRE-2507") _
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed before landing.


/* groovylint-disable-next-line CompileStatic */
job_status_internal = [:]
Expand Down
4 changes: 4 additions & 0 deletions vars/docOnlyChange.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ boolean call(String target_branch) {
echo "Hrm. Got an error fetching the target branch"
exit 0
fi
if ! git diff --no-commit-id --name-only origin/${TARGET_BRANCH} HEAD | grep -q -e ".*"; then
echo "Empty commit diff"
exit 0
fi
git diff --no-commit-id --name-only origin/${TARGET_BRANCH} HEAD |
grep -v -e "^docs/" -e "\\.md$" -e "^.*LICENSE.*$"'''
}
Expand Down