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

combine 'ws' and 'work space' pattern since Jenkins requires them to be non-empty #479

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

dirk-thomas
Copy link
Member

@dirk-thomas dirk-thomas commented Jun 17, 2020

Fixes regression from #477 which fails build if there are no files matching the pattern.

The ant FileSet pattern doesn't support something like (foo|bar) afaik. Therefore I just matched any directory with * which shouldn't be a problem since the rest of the pattern is highly specific which shouldn't match anywhere else.

Test builds:

  • without this fix: Build Status
  • with this fix: Build Status
  • with this fix and a compiler warning: Build Status

…be non-empty

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas added the bug Something isn't working label Jun 17, 2020
@dirk-thomas dirk-thomas self-assigned this Jun 17, 2020
Copy link
Member

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

Looking at the passing build, I don't think the wide-open glob presents a problem but if we see performance issues with the pattern match we could consider narrowing the pattern again.

<io.jenkins.plugins.analysis.warnings.Cmake>
<id></id>
<name></name>
<pattern>@(workspace)/log/build_*/*/stdout_stderr.log</pattern>
<pattern>*/log/build_*/*/stdout_stderr.log</pattern>
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking something more precise like

Suggested change
<pattern>*/log/build_*/*/stdout_stderr.log</pattern>
<pattern>{ws,work space}/log/build_*/*/stdout_stderr.log</pattern>

I think it only matters if we notice these globs taking a long time to resolve.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think that syntax is doing what you intend: Build Status which should have a compiler warning.

[GNU C Compiler (gcc)] [-ERROR-] No files found for pattern '{ws,work space}/log/build_//stdout_stderr.log'. Configuration error?

@dirk-thomas dirk-thomas merged commit e347765 into master Jun 17, 2020
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/fix-warning-pattern branch June 17, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants