-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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] skip stages if only docs changes #18315
Conversation
💔 Build FailedExpand to view the summary
Build stats
Test stats 🧪
Log outputExpand to view the last 100 lines of log output
|
This reverts commit 3ab19a3.
Jenkinsfile
Outdated
|
||
// Skip all the stages for PRs with changes in the docs only | ||
env.ONLY_DOCS = !params.runAllStages && | ||
isGitRegionMatch(patterns: [ '^docs/.*' ], shouldMatchAll: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this catch changes to files with paths such as ./auditbeat/build/docs/shared/settings60.asciidoc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally there are also "source" doc files such as ./filebeat/docs/modules/apache.asciidoc
. So I'm wondering if this check needs be more about catching changes to any files (regardless of path) that end in .asciidoc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's indeed a good point, I actually thought it was just this initial PR, and then I found I missed the make update
, so working on supporting those particular scenarios too. Thanks for the heads up :) I just moved the PR to draft to work on it.
Regarding the files, I see png
files too, I don't know if there are some other type of files. If no, then I can include it in the filter to be file based rather than folder based as you suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point re: png
files. And, as you said, there might be others too.
How about we start with asciidoc
for now, since those do change relatively often, compared to other "non-code" types. And maybe we can add more types later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
png is also in the list of allowed files, let's then plan the following support files, if any, with some follow-ups. :)
…alidate changes in the generated files rather than sources
💚 Build SucceededExpand to view the summary
Build stats
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
💔 Build FailedExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
What does this PR do?
Skip all the stages, but the checkout and linting, in the pipeline when the changeset is only for changes in any
asciidoc
andpng
files independently where they are.NOTE: this particular skip stages feature will only happen for the Pull Requests. In other words, any commits into any branch that are related to those docs files will trigger the builds as expected. This could be changed if required, but let's agree firstly :)
Why is it important?
Fast feedback and avoid unnecessary builds for changes that are purely docs related
How to test this PR locally
It does require a CI to validate his particular behaviour, or tweak the regex to allow changes in the Jenkinsfile and docs. I'll create a commit for testing this particular behaviour.
With a commit that enable the docs only CI
Expand to view
For instance, 7c9e214 caused the build #12
With the above commit and the run all stages
Expand to view
The build #3
Use cases
As a tech writer or docs contributor I do want to get early feedback without the hassle of running through the project build lifecycle.
Tasks