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

[ci] speed builds for module specific changes #18592

Merged
merged 10 commits into from
May 20, 2020
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,11 @@ def loadConfigEnvVars(){

// Skip all the stages for changes only related to the documentation
env.ONLY_DOCS = isDocChangedOnly()

// Run the ITs by running only if the changeset affects a specific module.
// For such, it's required to look for changes under the module folder and exclude anything else
// such as ascidoc and png files.
env.MODULE = getGitMatchingGroup(pattern: '[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*', exclude: '^(((?!\\/module\\/).)*$|.*\\.asciidoc|.*\\.png)')
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we're now excluding anything that's not under /module/, do we also need the .*\.asciidoc and .*\.png patterns in the exclude list?

Copy link
Member Author

@v1v v1v May 20, 2020

Choose a reason for hiding this comment

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

Yes, we do, otherwise all those PRs that change the top-level CHANGELOG.next.asciidoc will not match the pattern, besides, the exclude does include the png files similar to the pattern that it is used for whether the PR is only related to docs changes. We could potentially remove the png if required, although I don't know all the cases, but the asciidoc is needed.

For instance:

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, lets keep this for now and optimize later.

}

/**
Expand Down