feat: run most frequent flavours in the PR stage#873
feat: run most frequent flavours in the PR stage#873mdelapenya merged 15 commits intoelastic:masterfrom
Conversation
This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build
| - "ubuntu-18.04" | ||
| scenarios: | ||
| - name: "Fleet" | ||
| pullRequestFilter: "&& ~debian" |
There was a problem hiding this comment.
Adding the BDD filters here will simplify the logic in the pipeline
| def platform = args.get('platform') | ||
| def suite = args.get('suite') | ||
| def tags = args.get('tags') | ||
| def pullRequestFilter = args.get('pullRequestFilter')?.trim() ? args.get('pullRequestFilter') : '' |
There was a problem hiding this comment.
Do not add a filter if the key is not present or empty
| def suite = item.suite | ||
| def platforms = item.platforms | ||
| item.scenarios.each { scenario -> | ||
| def pullRequestFilter = scenario.pullRequestFilter |
There was a problem hiding this comment.
If the key is not present, what value will be passed here? Should we add defensive code here too?
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
| pullRequestFilter: "&& ~ubi8" | ||
| tags: "stand_alone_agent" | ||
| - name: "Backend Processes" | ||
| pullRequestFilter: "&& ~debian" |
There was a problem hiding this comment.
| pullRequestFilter: "&& ~debian" | |
| pullRequestFilter: " && ~debian" |
Because there is only one variant, we are removing the @variant tag
EricDavisX
left a comment
There was a problem hiding this comment.
yeah, i like this - thanks Manu.
|
Mmm... I'm thinking we need to cover the use case where a PR on beats triggers the master branch here. We could pass a special flag from the PR so that we could identify the triggered build. @kuisathaverat @v1v do you know if it's possible to identify that the upstream job is a PR with the build causes? |
|
Now that we support detecting the upstream cause for PRs, I'm going to merge this one. Thanks! |
* chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite
* chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite
* chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite
…7.11.x (#882) * feat: run most frequent flavours in the PR stage (#873) * chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite * fix: proper usage of step (#883)
…7.12.x (#881) * feat: run most frequent flavours in the PR stage (#873) * chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite * fix: proper usage of step (#883)
…7.x (#880) * feat: run most frequent flavours in the PR stage (#873) * chore: decouple centos from debian in BDD examples This change will support the selection of centos, debian or both when running the tests. Therefore the CI will be able to run only tests for centos in the PR phase, speeding up the PR build: The other OSs could be run in the nightly build * feat: run centos in the PR phase * feat: do not run ubi8 in the PR phase * fix: negate tags to skip only those ones * fix: enclose variable in double quotes * fix: add whitespaces * fix: defensive programming for the new key * chore: move old MySQL versions to the nightly build Because there is only one variant, we are removing the @variant tag * chore: use PR filter for MySQL YAML descritor * chore: move MySQL 5.7 to the PR phase * chore: move Percona out to the PR phase * chore: append PR filter for upstream PRs * chore: support running endpoint tests for debian * chore: move endpoint processes to the process feature file * chore: do not add Debian tests for PRs in endpoint test suite * fix: proper usage of step (#883)
…hings * upstream/master: [CI] tear down the workspace (elastic#885) docs: add Make as build system (elastic#886) fix: proper usage of step (elastic#883) feat: run most frequent flavours in the PR stage (elastic#873) break: move from "pull-requests" to "commits" GCP bucket (elastic#866) fix: use proper flags (elastic#868) feat: instrument Helm charts test suite (elastic#858)
What does this PR do?
This PR refactors how the BDD feature files are structured, separating the existing examples for a scenario into multiple
Examplesblock, annotated with the example type.I.e., instead of:
we will have:
To instruct the CI we are adding a new
pullRequestFilterkey in the E2E YAML descriptor for CI, which is read by the pipeline to configure the build, including the Gherkin tags to be appended for a PR. Therefore, the CI will append thepullRequestFiltertags to the tags to be added to the current execution, only for PRs.For Fleet's endpoint integration, the PR filter will add
~debian, indicating that debian scenarios will be skipped.For Fleet's fleet mode, the PR filter will add
~debian, indicating that debian scenarios will be skipped.For Fleet's Standalone mode, the PR filter will add
~ubi8, indicating that UBI8 scenarios will be skipped.If the key is empty, the pipeline will add an empty string, which means keeping old behaviour.
We are using same approach for metricbeat's MySQL versions: moving most used versions to the PR phase (latest MariaDB, and MySQL 8 and 5.7) and the rest (old versions and Percona) to the nightly.
Why is it important?
We will be able to instruct the CI to add the selected tag/annotation to be run for PRs, speeding up the PR build (actually halfing it). On the other hand, nightly builds should include those skipped scenarios.
Checklist
make noticein the proper directory)Author's checklist
CentosorDebianas the OS to be skipped in the PR phase for the Fleet mode testsUBI8or thedefaultone as the flavour to be skipped in the PR phase for the Standalone tests@michalpristas @EricDavisX could you please help me out to choose the platform?
Related issues
Use cases
For fleet mode:
For stand-alone mode:
Follow-up
Document the connection between Gherkin tags and the I descriptor