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] Run linting for only docs #23099

Merged
merged 1 commit into from
Dec 16, 2020
Merged
Changes from all 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
11 changes: 8 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ pipeline {
withBeatsEnv(archive: false, id: "lint") {
dumpVariables()
setEnvVar('VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim())
cmd(label: "make check-python", script: "make check-python")
cmd(label: "make check-go", script: "make check-go")
cmd(label: "Check for changes", script: "make check-no-changes")
whenTrue(env.ONLY_DOCS == 'true') {
cmd(label: "make check", script: "make check")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is possible to run the lint stage(Jenkinsfile.yml) of each beat? it is the same but in parallel so faster

Copy link
Member Author

@v1v v1v Dec 15, 2020

Choose a reason for hiding this comment

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

That's another approach to solve this issue:

  • Either to exclude the ONLY_DOCS when in the Builds&Tests dynamic stages. But it will also run the build/tests stages, and if flaky tests then it might cause failed builds for only docs changes.
  • Or this approach

That's the current implementation, but my aim with this PR was to avoid changing the current implementation but enabling the make check only for the DOCS changes.

In both cases, the output is the same, I guess

Copy link
Contributor

Choose a reason for hiding this comment

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

let's live with it, but takes 15 min :(

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only for docs changes, if any kind of code changes, then it will work as used to be.

}
whenTrue(env.ONLY_DOCS == 'false') {
cmd(label: "make check-python", script: "make check-python")
cmd(label: "make check-go", script: "make check-go")
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
cmd(label: "Check for changes", script: "make check-no-changes")
}
}
}
}
Expand Down