Commit graph

420 commits

Author SHA1 Message Date
dkirchan
2cc03329e4
[Security] Fixed key issue in pipeline for quality gate (#188952)
A " was missed in a key in the pipeline for the rule management tests
for Security Quality Gate.
2024-07-23 16:45:39 +02:00
Jon
a68f812800
[ci] Implement kibana-pointer-compression pipeline (#188480)
Closes https://github.com/elastic/kibana/issues/186631
Closes https://github.com/elastic/kibana-operations/issues/151

Adds a daily pipeline for running our jest and integration tests against
a Node.js distribution with pointer compression enabled. This is enabled
by setting the environment variable
`CI_FORCE_NODE_POINTER_COMPRESSION=true`

I would prefer a cleaner implementation, but I'm not seeing a way around
it without changing our defaults globally. Open to ideas. We have to
update three downloads:

1) base node.js install, for jest
2) build node.js install, for integration tests
3) bazel workspace install, for dependencies

https://buildkite.com/elastic/kibana-pointer-compression/builds/6

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2024-07-22 17:13:27 -05:00
Jon
d8302eb2ec
[deb] Add adduser as a dependency (#185048)
adduser is used in the deb post install script. Installing kibana.deb in
a container won't have the necessary dependencies by default

Closes #182537

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-22 11:31:20 -05:00
Garrett Spong
40b966c0c8
[Security Assistant] Cleanup MKI test configs (#188665)
## Summary

In https://github.com/elastic/kibana/pull/188168 we cleaned up some of
our API tests, but missed these other references and so have failures on
the [periodic test
pipeline](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-gen-ai/builds/854).
This PR updates these configs to remove the test commands that no longer
exist.
2024-07-19 02:09:22 +10:00
Jon
01a62b0052
[ci] Add kibana-pointer-compression pipeline (#188435)
Pipeline steps will be added in a followup PR, this only creates the
pipeline.
2024-07-16 12:28:50 -05:00
Konrad Szwarc
f96d55a4f5
[EDR Workflows] MKI API tests (#187560)
This pull request introduces two changes to our existing API integration
tests:
1. It restructures the files to follow the security solution-wide
standard.
2. It adds our API integration tests to the periodic MKI pipeline.
[Example
build](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/818)

**Change of Structure:**
All tests have been moved to
`x-pack/test/security_solution_api_integration/test_suites/edr_workflows`
and are grouped by feature and then by licensing.
![Screenshot 2024-07-10 at 11 52
42](223c9138-8702-42f2-a801-a35be87304cb)

**MKI:**
Due to the nature of our tests – their dependence on switching users
and/or modifying internal indices – only 3 out of 7 test suites qualify
to be run in MKI. I've added all test suites to
`.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_defend_workflows.yml`.
However, the ones that would be skipped are commented out to avoid
consuming resources without providing any value.

**Testing for Regression:**
I've noticed that the `@skipInServerlessMKI` tag is not working as
expected. Tests tagged with `@serverless @skipInServerlessMKI Test Name`
were not being run in the PR pipelines. The grep pattern we were using
in individual configs and in
`x-pack/test/security_solution_api_integration/scripts/index.js`
(`'/^(?!.*@skipInServerless).*@serverless.*/'`) would also match
`@skipInServerlessMKI`.

I've modified the pattern to look for a full word, expecting it to be at
the beginning or end of a string, and to be followed or not followed by
a whitespace. We could use unit tests for these grep patterns 😄

Here is a screenshot of the new regex being tested:

![Screenshot 2024-07-10 at 12 09
28](8b9dd49a-3ca5-458d-9567-ad938847f169)

This led me to double-check whether all our API integration tests are
being executed in both PR and MKI pipelines, all seems to be in place:

**MKI:**
1. Artifacts -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81ae-47c3-a867-b16de4bfa20e/262-380)
- 0 tests executed due to `@skipInServerlessMKI` present in all top
describe of each test file
2. Authentication -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b0-4824-a658-3a881607eb56)
- 0 tests executed due to `@skipInServerlessMKI` present in all top
describe of each test file
3. Metadata -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b1-4730-9b51-512b1b554f64/261-386)
- 0 tests executed due to `@skipInServerlessMKI` present in all top
describe of each test file
4. Package -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b3-418c-ad33-0cd7dd68ad46/261-370)
- 0 tests executed due to `@skipInServerlessMKI` present in all top
describe of each test file
5. Policy Response -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b4-4034-a575-3ddbdde42e24/261-422)
- all tests were executed
6. Resolver -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b5-482d-8023-e1f819d3c56e/261-711)
- all but the tests with `@skipInServerless` were executed
7. Response actions -
[buildkite](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/817#01909bfb-81b7-4561-83a3-6896523cff8f/262-403)
- only one file was executed due to the second one being tagged as
`@skipInServerlessMKI`

**PR:**

All tests are accounted for and executed as expected, no regression.
package suite was never executed since it's `.skip`


policy_response/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-675b-4fab-a787-e5e472711fb0/3394)
policy_response/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-678f-49c6-ae4f-aee3738713c2/3446)
authentication/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-6768-4330-9b6c-8328a46a5a99/2352)
authentication/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-67b3-4b9b-ba31-110f737a1f3f/1970)
resolver/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-6759-49a3-8cb7-4b0097cf8975/6266)
resolver/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-676a-4dfe-bc19-6fd50e42980a/3302)
metadata/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-676c-49ff-b0a5-cf7acc9c5506/4827)
metadata/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-679e-45e8-aa52-5672baf344df/3000)
response_actions/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-67ad-4826-bb58-4b6330fef338/2760)
response_actions/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-67b7-4a6a-a37d-d138a7054a41/9654)
artifacts/ess
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-67d6-4926-a93f-b193ab2859be/1158)
artifacts/serverless
[buildkite](https://buildkite.com/elastic/kibana-pull-request/builds/220548#01909c0b-672e-4350-8820-c7fd8d7ef010/2328)

---------

Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
2024-07-12 14:41:41 +02:00
Alex Szabo
ba3f83cd3d
[CI] Remove kme leftovers (take 2) (#187947)
## Summary
Retries #187762 again. There was a partially removed step in the
previous attempt, that's now fully removed.
2024-07-10 16:01:06 +02:00
Jonathan Budzenski
369277fcbc Revert "[CI] Remove kme leftovers (#187762)"
This reverts commit 41ee64709f.
2024-07-09 13:05:08 -05:00
Alex Szabo
41ee64709f
[CI] Remove kme leftovers (#187762)
## Summary
These were used for testing the migration from the kibana-buildkite
infra to the elastic-wide buildkite infra. Now we're done with most of
the migration, we can clean these up.
2024-07-10 03:36:34 +10:00
dkirchan
55bbab1756
[Security Solution][Serverless] Fixed periodic pipeline for Gen AI (#187561)
Buildkite format was not preserved during a past merge into main. Fixing
this issue.
2024-07-05 09:11:07 +02:00
Gloria Hornero
07a74304fe
[Security Solution][Threat Hunting] Adds threat hunting API tests to our QGs (#187389)
## Summary

The Threat Hunting API tests are not part of our QGs, in this PR we are
adding them to it.

Once this PR is merged:

- All the API tests marked as `@serverless` are going to be executed as
part of the periodic pipeline
- Once this other [PR](https://github.com/elastic/kibana/pull/187266) is
merged, all the API tests marked as `@serverlessQA` will be executed as
part of the Kibana QA QG (second quality gate).

---------

Co-authored-by: dkirchan <diamantis.kirchantzoglou@elastic.co>
2024-07-04 19:00:44 +10:00
Gloria Hornero
2afe55eaec
[Security Solution] Updates periodic pipeline job names (#187378)
## Summary

Currently is not possible to see at first sight which execution is from
Cypress and which one from API.

<img width="2545" alt="Screenshot 2024-07-02 at 17 18 04"
src="c89c204d-e2cf-4661-87f4-1e206ad822d7">

In this PR we are updating the naming to make it easier to find out as
well as simplifying the names.
2024-07-02 12:00:15 -05:00
Robert Oskamp
013bda4e60
Add pipeline for serverless emergency release quality gate (#187251)
## Summary

This PR adds separately quality gate pipelines for the emergency release
process.

More details in the original PR #186833, which is split into the
creation of the new pipeline (this PR) and moving existing pipelines
from `catalog-info.yaml` to `.buildkite/pipeline-resource-definitions`
(#187253).
2024-07-02 13:15:31 +02:00
Alex Szabo
6b61af3fde
[CI] Use elastic-images-prod everywhere (#185952)
## Summary
Some references to `elastic-images-qa` were left in the code, probably
as these pipelines were on a pending PR when the rest got changed.

Optionally, we should remove all the `imageProject` fields, and
everything we're setting defaults - it's just generating bloat.
2024-07-02 10:16:07 +02:00
Jon
9854ecf93c
[build] Rename chainguard -> wolfi (#187095)
To be consistent with other stack products.
2024-06-28 09:13:52 -05:00
Jonathan Budzenski
e23230f072 Revert "Add serverless emergency release quality gate pipeline (#186833)"
This reverts commit cbedb5fff8.
2024-06-28 09:07:52 -05:00
Robert Oskamp
cbedb5fff8
Add serverless emergency release quality gate pipeline (#186833)
## Summary

This PR adds separately quality gate pipelines for the emergency release
process.
This gives us the opportunity to run a different set of checks during an
emergency release compared to a regular release.

### Details

- Add new emergency quality gates pipeline definitions in
`.buildkite/pipelines/quality-gates/emergency`. These are copies of the
regular quality gates pipeline files with the following adjustments:
- The entry point `kibana-serverless-quality-gates-emergency.yml` has an
adjusted `QG_PIPELINE_LOCATION` and comment
- The QA quality gates in `pipeline.tests-qa.yaml` is reduced to just
the CP e2e tests
- Add new pipeline
`.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates-emergency.yml`
is added that will trigger the emergency version of the quality gates.

### Other changes

In order to have things around the serverless quality gates and the
emergency release consistent, I've taken the opportunity and moved the
definitions of the following pipelines from `catalog-info.yaml` to
`.buildkite/pipeline-resource-definitions`
- `buildkite-pipeline-kibana-emergency-release` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml`
- `kibana-tests-pipeline` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml`
2024-06-28 13:04:38 +02:00
Alex Szabo
c9d2b70f84
[CI] Print ES docker images versions (#186885)
## Summary
When we're seeing errors in FTR or on the serverless verification
pipeline, we have difficulty connecting back what version of
ES-Serverless is behind the tag `:latest`.
With a recent addition to the ES Serverless docker image, this info is
now contained in labels of the image.

This PR highlights this info in the verification pipeline, as well as
the FTR output from `kbn-es`.

- Serverless verification pipeline:
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1454
- FTR:
![Screenshot 2024-06-25 at 17 30 48
(1)](b6244f99-52e8-4fc6-ac22-e69e01254f1f)
2024-06-27 10:36:09 +02:00
Brad White
15a0b8e4cf
[CI / FIPS] Convert smoke tests to use FIPS agent (#186858)
## Summary

Closes elastic/kibana-operations#137

- Convert FIPS daily smoke test pipeline to use FIPS agents
  - This allows the smoke tests to run in parallel now
- Removes FIPS Vagrant box from package testing
- Adds verify FIPS enabled check to pipeline 

Pipeline run: https://buildkite.com/elastic/kibana-fips/builds/90
2024-06-26 12:55:51 -07:00
Jon
985a28fd3b
Update obs-onboarding cypress CI config (#186926)
- removes parallelism: 2 from step definition. The test suites are not
sharded.
- Updates the path used to trigger a test run. The previous path is out
of date.
2024-06-26 09:15:03 -05:00
Alex Szabo
350044a927
[BK] Migrate emergency-release-branch-testing pipeline to the new infra (#186537)
## Summary
Migrates (without history preservation) the emergency release branch
testing job to the new infra

Verified through:
 - [x] locally tested the pipeline definition file
- [x] ran the testing pipeline through the migration staging job
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/125#_)
2024-06-21 16:16:02 +02:00
Brad White
324673c8d6
[ci / FIPS] Dynamic agent selection. Add FIPS agents (#183777)
## Summary

- Closes https://github.com/elastic/kibana-operations/issues/100
- Utilizes FIPS agent from elastic/ci-agent-images#686
- Adds dynamic agent selection during PR pipeline upload
- FIPS agents can be used with `FTR_ENABLE_FIPS_AGENT` env variable or
`ci:enable-fips-agent` label
- Removes agent image config from individual steps in favor of image
config for the whole pipeline.
- Steps can still override this config by adding `image`, `imageProject`
etc
- Adds a conditional assertion to `Check` CI step which validates that
FIPS is working properly


### Testing
- [Pipeline run using FIPS
agents](https://buildkite.com/elastic/kibana-pull-request/builds/215332)
  - Failures are expected and this possibly ran with flaky tests
2024-06-20 13:09:45 -07:00
Drew Tate
ca98a8bd93
[ES|QL] add docs step to sync pipeline (#186011)
## Summary

https://github.com/elastic/kibana/pull/184689 added a script to gather
ES|QL function docs from Elasticsearch.

This PR adds it to our CI pipeline!

Close https://github.com/elastic/kibana/issues/173492
Close https://github.com/elastic/kibana/issues/173817

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-12 17:42:37 -07:00
Alex Szabo
b5af943714
[BK] Migrate the kibana-on-merge job (#184391)
## Summary
This PR adds the pipeline resource definition and adjusts the agent
targeting rules for the
[kibana-on-merge](https://buildkite.com/elastic/kibana-on-merge) job.

Migration staging runs: 
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/116

8.14: #184513 
7.17: #184497
2024-06-11 10:08:16 +02:00
dkirchan
c123250784
[Security] [Serverless] Fixed quality gates parallelism for Cypress (#184781)
In this PR a chain of pipeline structures is introduced. 
For each different solution team, depending on the flag
KIBANA_MKI_QUALITY_GATE, if it is '1' it uploads the respective team
pipeline from the path
`.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate`
otherwise it uses the respective pipeline from the path
`.buildkite/pipelines/security_solution_quality_gate/mki_periodic`.

For the quality gate, the cypress tests will be using for now the level
of parallelism equal to 1 as not many tests are yet enabled.
For the periodic pipeline the original level of parallelism is
respected.

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2024-06-10 16:30:57 +02:00
Jon
8f9630b0b9
[ci] Remove defend workflows from on-merge-unsupported (#185047)
This is already in the on-merge pipeline.
2024-06-07 14:35:34 -05:00
Alex Szabo
265e8799b8
[CI] Prevent deployment of missing/failed serverless docker images (#184594)
## Summary
Removes `soft_fail` to prevent the run of the deploy script if something
about the image build fails.

Closes: https://github.com/elastic/kibana/issues/184591
2024-05-31 11:16:08 -05:00
Drew Tate
cf1ff97c12
[ES|QL] add function definition sync to CI (#184225)
## Summary

Runs the script added in https://github.com/elastic/kibana/pull/179584
on the weekly schedule.

Successful run:
https://buildkite.com/elastic/kibana-es-ql-grammar-sync/builds/21#018fab3b-d051-4852-a03e-889cf156fb70/838

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-05-28 11:02:20 -05:00
Alex Szabo
f321c4ff2c
[CI] Fix agent targeting for pipelines added since the PR-build migration (#184208)
## Summary
Some pipelines were added/changed since the PR build pipeline was open,
this retroactively fixes those agent targeting rules.
2024-05-24 13:30:16 +02:00
Alex Szabo
09a165f3e6
[BK] Migrate batch 2 - kibana-pull-request job (#183158)
## Summary

Part of: https://github.com/elastic/kibana-operations/issues/79

Migrates: 
- kibana / pull-request
[base.yml](https://buildkite.com/elastic/kibana-pull-request)

## Validations
- [x] Validated RRE locally

Tested on the kme test pipeline: 
- [x] Main: https://buildkite.com/elastic/kibana-kme-test/builds/343
- [x] [8.14](https://github.com/elastic/kibana/pull/183537):
https://buildkite.com/elastic/kibana-kme-test/builds/340
- [x] [7.17](https://github.com/elastic/kibana/pull/183707):
https://buildkite.com/elastic/kibana-kme-test/builds/339
2024-05-24 10:37:36 +02:00
Alex Szabo
989729fe39
[CI] Skip build step, if KIBANA_BUILD_ID is given (#184121)
## Summary
Similar to other cases in our CI, if `KIBANA_BUILD_ID` is present, we
can skip the build step, and the test steps would download artifacts
from the referenced build.

If the elasticsearch side invocations to this pipeline provide
`KIBANA_BUILD_ID`, then we can save ~15-20m on these runs.

see: https://elastic.slack.com/archives/C5UDAFZQU/p1716450726916959

closes: https://github.com/elastic/kibana-operations/issues/116
2024-05-23 15:48:21 +02:00
dkirchan
abb29e8c75
[Security][Serverless] Quality Gate API Integration tests split (#183612)
## Summary
This PR splits the API Integration test suite from one pipeline
including all tests to using the already existing pipelines for the
security quality gate and splitting the TS scripts per team.

With this PR merged the following should happen:
- The [FTR API integration
tests](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-api-integration/builds/445)
pipeline should be removed
- All the scripts of this pipeline are split to the relevant team
pipelines. For example the team which maintains the tests should be able
to see the following structure when a build is triggered. (The noted
group is the API tests for the specific team)
<img width="1182" alt="Screenshot 2024-05-20 at 5 56 49 PM"
src="87c1fc1c-4425-4756-890f-b458da0e189a">
- In order to identify why the build is triggered, (Quality gate OR
Periodic Pipeline) the following two snippets will define the _triggered
by_ information.

---

**Triggered By Quality Gate**
<img width="1156" alt="Screenshot 2024-05-20 at 5 21 04 PM"
src="0e3e8928-7306-44ee-acd8-4368d93e452d">

** Triggered By Periodic Pipeline ** 
<img width="1154" alt="Screenshot 2024-05-20 at 5 49 11 PM"
src="aa8d6591-a612-4f60-a433-c80e213bc6b8">

---------

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2024-05-22 15:55:49 +03:00
Shahzad
8b7fa0d3f8
[SLO] Synthetics based SLO e2e tests (#183637)
## Summary

Setting up Elastic/Synthetics based slo e2e tests !!

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-20 11:49:22 +02:00
Isaac Karrer
135961b720
Update docker.elastic.co/ci-agent-images/quality-gate-seedling Docker tag to v0.0.4 (#183781)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/ci-agent-images/quality-gate-seedling | patch |
`0.0.2` -> `0.0.4` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuOSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2024-05-17 15:06:18 -07:00
Alex Szabo
5e95a76796
[CI] Use new-infra-type agent targeting for chainguard build (#183545)
## Summary
This PR ties https://github.com/elastic/kibana/pull/183200 +
https://github.com/elastic/kibana/pull/182582 together
2024-05-15 19:26:44 +02:00
Alex Szabo
834ea8810c
[CI] Increase artifact build timeout (#183482)
## Summary
Increases step timeout for building the whole artifact collection by
15m.

With some recent additions ([chainguard
build](https://github.com/elastic/kibana/pull/183200) adds ~7m) and the
new infra overhead, we've gone from ~50-52 minutes to ~57-60 minutes
(this one timed out exactly on the last bit:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4295#018f7b4c-3629-4c4f-8d80-85b2552a43c4)
2024-05-15 12:28:58 +02:00
Jon
6aa7987eeb
[build] Add image based on chainguard (#183200)
Adds a new docker image, `kibana-chainguard` using
[chainguard-base](https://images.chainguard.dev/directory/image/chainguard-base).
For now this is only for testing, exact naming tbd.

Testing
```
docker load < kibana-chainguard-8.15.0-SNAPSHOT-docker-image-aarch64.tar.gz
docker run --rm docker.elastic.co/kibana/kibana-chainguard:8.15.0-SNAPSHOT
```
2024-05-14 16:10:07 -05:00
Jon
0982835800
[ci] Fix ci:build-serverless-image (#183394)
artifacts_container_image.yml is attempting to select an agent that
doesn't exist on Kibana CI's infrastructure
2024-05-14 09:26:32 -05:00
Patryk Kopyciński
13db1c9b21
Downgrade Cypress to 13.6.2 (#183047)
## Summary

We noticed some instability in Cypress in current version, downgrading
seems to be solving the issue.
2024-05-14 16:04:23 +02:00
Alex Szabo
d5362fdaf7
[BK] Migrate batch 1 (Artifact builds) (#182582)
## Summary
Migrates batch 1 - artifact builds. The upload aspect wasn't tested,
because it's programmed only to run from `main`, and we didn't want to
interfere with the ongoing releases. This can be tested after the merge.

Verification:
- [x] RREs tested locally
- [x] kibana / artifacts trigger
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/87)
- [x] kibana / artifacts container image
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/86)
- [x] kibana / artifacts snapshot
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/88)
- [x] kibana / artifacts staging
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/88)
- [x] 8.13 / 8.14 / 7.17 verification (only a few jobs need to work
here)

Originals:
- kibana / artifacts trigger
[kibana-artifacts-trigger.yml](https://buildkite.com/elastic/kibana-artifacts-trigger)
- kibana / artifacts container image
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-container-image)
- kibana / artifacts snapshot
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-snapshot)
- kibana / artifacts staging
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-staging)

Backports:
 - https://github.com/elastic/kibana/pull/182781
 - https://github.com/elastic/kibana/pull/182780
 
The backports don't need to have the pipeline resource definition files,
however, we forked 8.14 off from main, where we already had the
resources. I'll remove all the unnecessary resource defs from the legacy
branches, once we finalize the state (simply to save a little
inconvenience on future backports.)
2024-05-13 16:06:55 +02:00
Alex Szabo
ef35ee9db6
[CI] Mitigate typecheck timeout issues (#183257)
## Summary
We've recently seen a handful of step timeouts when running type-checks.
While this is not the best solution, it mitigates for potential builds
failed, and retries due to timeouts.

This PR also contains some cleanup around previous, type-check related
jobs (e.g.: the [type-check issue of 2023
august](https://github.com/elastic/kibana/pull/167060))
2024-05-13 15:17:12 +02:00
Alex Szabo
38d4230e61
[CI] Comment flaky test results on tested PR (#183043)
## Summary
Extends the flaky-test-runner with the capability to comment on the
flaky test runs on the PR that's being tested.

Closes: https://github.com/elastic/kibana/issues/173129

- chore(flaky-test-runner): Add a step to collect results and comment on
the tested PR
2024-05-13 03:47:30 -07:00
Alex Szabo
a1b32be9a2
[CI] Switch to use elastic-images-prod for all migrated pipeline steps (#183140)
## Summary
We stuck with using the `elastic-images-qa` because that's how we
initially set up the migration scripts and didn't bother to switch over
once we got the images working as most of the pipelines were low-risk,
and a potential issue would have been easy to fix.

While the same image goes to QA and prod every day, moving forward, we
need to allow some experimentation at the QA images level, as we work on
the caching and further optimizations. We shouldn't allow that
experimentation to affect the already migrated pipelines.

This PR switches over to using the `elastic-images-prod` repo. Images
get promoted here if they're built from the `main` of
https://github.com/elastic/ci-agent-images, or promoted manually from a
branch build.

This change should not affect existing behavior. 
We didn't test every pipeline but the assumption is that if one works,
all works:
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/94

Will merge this once 8.13 is no longer active.
2024-05-10 10:03:11 -05:00
Jon
240b54180a
[ci/project-deploy] Run more checks before deploying (#183058)
This splits the project build and deploy steps into two: build the
container image, and then deploy. This will allow us to build the
project image in parallel with other checks, and deploy later after a
smoke test is completed. Currently this uses static checks of:
- project image build
- linting
- lint with types
- checks
- type check

Time to project deployment is expected to be ~5~ 1 minute longer. If
needed we can expand to functional tests, but in the interim this should
cover the issue we saw in https://github.com/elastic/kibana/pull/180309.
2024-05-10 06:33:33 -05:00
Jon
07b8df2a1e
[ci/on-merge] Security solution tests depend on quick_checks (#183031)
Currently, if quick checks fail, security solution tests will continue
to run. We want to skip running the extended test suite.
2024-05-09 17:17:00 -05:00
Jon
4982ead45c
[ci/verify-es-serverless] Add annotation with command to run es image locally (#182579)
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1074#annotation-es-serverless-run
2024-05-06 17:12:43 -05:00
dkirchan
75c7f1190d
[Security][Serverless] FTR API Integration tests - Refactoring - Issue fixing (#182245)
## Summary

This PR is addressing the following issues:
- The pipelines defined in
`.buildkite/pipeline-resource-definitions/security-solution-quality-gate/`
folder were skipping intermediate builds. We need to be able to run more
than one build in the same time for these pipelines.
- As part of the refactoring / optimization of the
`.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh`
script, it now executes a TS script in order to handle the projects for
serverless and execute the yarn script provided.
- As part of this refactoring, the methods and worfklow defined in the
`x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts`
is now followed in order to reduce code duplication and maintenance.
- Fixed an issue in
`x-pack/test/security_solution_api_integration/scripts/index.js`. This
issue was causing false green test executions in buildkite. The exit
code was not actually returned from the child process so the exit code
of this script was 0, even though the child process (test execution) was
failing giving back an exit code 1.
- Parameterized
`.buildkite/pipelines/security_solution/api_integration.yml` to be
running the correct test suite (release or periodic) depending on
whether the environment variable `QUALITY_GATE=1` is passed or not.

The last bullet was misleading the test results interpretation, reading
as successful test runtime scripts which had one or more test failures.
E.g: [Buildkite Test Execution being green with failing
tests.](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-api-integration/builds/307#018f3409-c062-4edf-9663-3ba785823a6c/294-757)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-03 13:50:03 +02:00
Alex Szabo
77961a68e0
[BK] Migrate batch 7 (Performance) (#181133)
## Summary

Validation:
 - [x] RREs checked locally
 - [x] Pipelines staged
- [x] kibana / single-user-performance
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/62
 )
- [x] kibana / performance-data-set-extraction
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/60#018f0b96-7703-4e36-9924-f405073d0747
 )
- [x] kibana / scalability-benchmarking
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/68
 )
- [x] kibana / apis-capacity-testing
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/60#018f0b96-7703-4e36-9924-f405073d0747
 )
 - [x] 7.17 / 8.14 validation (   not needed, no branch builds set up)


Part of: https://github.com/elastic/kibana-operations/issues/79

Migrates: 
- kibana / single-user-performance
[kibana-performance-daily.yml](https://buildkite.com/elastic/kibana-single-user-performance)
- kibana / performance-data-set-extraction
[kibana-performance-data-set-extraction-daily.yml](https://buildkite.com/elastic/kibana-performance-data-set-extraction)
- kibana / scalability-benchmarking
[scalability_testing-daily.yml](https://buildkite.com/elastic/kibana-scalability-benchmarking-1)
- kibana / apis-capacity-testing
[kibana-apis-capacity-testing-daily.yml](https://buildkite.com/elastic/kibana-apis-capacity-testing)

chore(BK): Migrate batch 7 - performance and testing

Depends on: https://elasticco.atlassian.net/browse/ENGPRD-524
2024-04-30 11:20:45 +02:00
Alex Szabo
4a90df23b6
[Fix] fix type issues from unparameterized PropsWithChildren type usages (#182014)
## Summary
Original problem: `PropsWithChildren` require a generic type parameter
(there's no default). This was not made visible in the merged PR,
because we had type-checking on the PRs temporarily (accidentally)
removed.

Thsi PR fixes the fallout from
https://github.com/elastic/kibana/pull/181257 => Errors:
https://buildkite.com/elastic/kibana-on-merge/builds/44454
2024-04-29 23:08:52 +01:00
Brad White
306bcf6e85
[ci] Add FIPS Vagrant box and nightly testing pipeline (#176980)
## Summary

- Closes elastic/kibana-operations#26
- Adds a Vagrant box and corresponding Ansible playbook to create a test
environment for FIPS
- Adds a daily pipeline to run a subset of FTR tests in FIPS mode

### Known Issues
1. The compilation of OpenSSL in FIPS mode is breaking some of the OS
libraries and functionality (`sudo` / `dnf` likely more). Possibly due
to custom OpenSSL installation using different locations than the OS
version.
2. ES is having trouble starting, likely due to issue 1 ([Log
link](https://buildkite.com/elastic/kibana-pull-request/builds/205420#018f0c58-3dc3-41c5-a1a5-9d9a9e14aacc/265-552)).
Disabling ML is a temp workaround added in
803945c759, but we likely need it enabled
in the future anyways, so best to find a proper fix. Tracking at
https://github.com/elastic/kibana-operations/issues/96

### Reviewers
You can view a run of the new pipeline during testing
[here](https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/84).

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2024-04-26 16:41:56 -07:00