Commit graph

77 commits

Author SHA1 Message Date
Dimitrios Liappis
0083738cde
[ci] Initial aarch64 Buildkite pipeline (#15460)
This commit adds a skeleton Buildkite pipeline for aarch64
exhaustive tests.

- https://github.com/elastic/logstash/pull/15459
- https://github.com/elastic/ingest-dev/issues/1724
2023-10-18 09:45:05 +03:00
Andres Rodriguez
235ba422cc
Change plugin test buildkite pipeline to run in parallel
Closes #15440
2023-10-16 10:42:05 -04:00
Dimitrios Liappis
555a8ff8e3
Migrate remaining PR jobs to Buildkite #15444
This commit adds the remaining steps for the Buildkite pull request pipeline i.e.

- `IT Persistent Queues / part 1`
- `IT Persistent Queues / part 2`
- `x-pack unit tests`
- `x-pack integration`

Once merged we will be able to retire the corresponding Logstash pull request multijob.

Relates:

- https://github.com/elastic/logstash/pull/15438
- https://github.com/elastic/logstash/pull/15437
- https://github.com/elastic/ingest-dev/issues/1721
- https://github.com/elastic/logstash/pull/15279
2023-10-14 09:46:52 +03:00
Dimitrios Liappis
816d7e6b2b
[ci] Add PR it-tests (part 1+2) to Buildkite (#15438)
This commit adds integration tests to the
Buildkite PR pipeline.

Relates:

- https://github.com/elastic/logstash/pull/15437
- https://github.com/elastic/ingest-dev/issues/1721
- https://github.com/elastic/logstash/pull/15279
2023-10-13 17:01:01 +03:00
Dimitrios Liappis
e285425d54
[ci] Commit PR based Java unit tests for Buildkite (#15437)
This commit adds Java unit tests (including sonar scans) to the
Buildkite pull request pipeline.

Relates: https://github.com/elastic/ingest-dev/issues/1721
2023-10-13 10:48:10 +03:00
Andrea Selva
a03a05b697
Defines a pipeline to run specs tests on supported plugins (#15380)
Defines a Buildkite pipeline to run specs tests on tier1 and tier2 plugins, using container images. The tasks are divided by plugin type for each tier, to run them in parallel. Once all tier1 testing is completed then starts with tier2.
2023-10-11 11:40:54 +02:00
Dimitrios Liappis
fd2910a6ef
[ci] Improve PR step names for Buildkite (#15421)
This commit shortens the descriptions of the PR Buildkite steps for
better readability on the UI.
2023-10-11 09:29:30 +03:00
Dimitrios Liappis
bc5ad292d4
[ci] Fix agents in BK pipeline for PRs (#15415)
This commit fixes a typo introduced in #15413 and #15402
2023-10-10 18:55:40 +03:00
Dimitrios Liappis
3bfd824f7c
[ci] Initial pull request jobs for buildkite (#15402)
This commit adds a Buildkite resource for pull requests and
the two simple jobs, license checking and ruby unit tests that are
already part of the Jenkins PR multi job setup.

As this is WiP, slack notifications aren't enabled.
2023-10-10 16:39:41 +03:00
Dimitrios Liappis
94dfd4773b
[DRA] Remove wait step in buildkite (#15366)
DRA artifact builds support two optional parameters
`VERSION_QUALIFIER_OPT` and `DRA_DRY_RUN`.  The most important is
`VERSION_QUALIFIER_OPT` which should be provided when `alpha1` or
similar versions need to be built.

Currently, after clicking new build, the pipeline takes ~20s to
assemble the steps and then pauses the job waiting for these options to be
filled (or just accept the empty defaults) and press continue.

I feel that this could be trappy behavior because the majority of the
use cases don't need it, and it's likely that a user manually clicks
build and forgets that they'd need to confirm these parameters later
on, left with a hanging build.

This commit makes the parameters optional. If needed, they should be
defined explicitly as Environment Variables in the New Build prompt,
after expanding the Options section.

The downside of this approach is that when needed, users need to
consult the documentation about the environment variable names.
2023-10-05 10:06:07 +03:00
Dimitrios Liappis
da51a6ac53
[buildkite] DRA staging + snapshot pipelines (#15344)
This commit is the step after #15337 and switches away from the generically named [logstash-dra-pipeline-ci](https://buildkite.com/elastic/logstash-dra-pipeline-ci)
pipeline to two separate pipelines for `snapshot` and `staging`, reflecting the current structure in [Jenkins](https://logstash-ci.elastic.co/view/DRA/).

We define a daily schedule for `snapshot`, but it's commented out for now, until we ramp down the Jenkins job.

Finally, as we've created a dedicated Buildkite team for `logstash`, we place both pipelines under this team.

Relates:

- https://github.com/elastic/ingest-dev/issues/1720
- https://github.com/elastic/logstash/pull/15337
2023-10-02 12:10:59 +03:00
Dimitrios Liappis
05c2627123
[DRA, buildkite] Use GCP vms for package build step (#15356)
We seem to be hitting a weird issue with the psych gem when running in a container:

```
> Task :bootstrap
2023-09-27T15:13:23.844Z [Execution worker Thread 5] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
Error Errno::ENOENT, retrying 1/10
No such file or directory - /buildkite/builds/bk-agent-prod-k8s-1695827479442731913/elastic/logstash-dra-pipeline-ci/vendor/bundle/jruby/3.1.0/gems/psych-5.1.0-java/deps.lst
```

This commit works around this problem by running inside a VM. The underlying root cause (and that gradle should be erroring in this case) will be investigated separately.
2023-09-28 11:16:51 +03:00
Dimitrios Liappis
12a98250cb
[DRA,buildkite] Use AWS aarch64 instance type (#15352)
We've spotted network flakiness downloading artifacts with gradle (connection resets) when using GCP/t2a on us-central1.
This commit switches to AWS Graviton instance types for building the aarch64 artifacts.
2023-09-27 16:41:51 +03:00
Dimitrios Liappis
dd77c9f927
[ci] Commit DRA -SNAPSHOT buildkite pipeline (#15337)
This commit adds support for building + publishing DRA (-SNAPSHOT for now) artifacts for Logstash. It builds on top of #15312 and therefore only targets the `main` branch and is intended to be run manually during a trial period before we retire the corresponding Jenkins job.

The structure is similar to Jenkins:

1. Three steps runs in parallel to build packages, x86_64 docker and aarch64 docker artifacts.

2. Once 1. is successfully done, use release manager to publish the artifacts.

We generate the pipeline steps for 1. and 2. dynamically (with a simple Python script) to avoid repetition for future PRs: we will add a new pipeline in a follow up PR for -STAGING.

The actual shell scripts are simplified copies from the existing `dra*` scripts under https://github.com/elastic/logstash/tree/main/ci; the simplification comes from native support for copying artifacts between steps in Buildkite and
not having to use an intermediate bucket.

Relates: https://github.com/elastic/ingest-dev/issues/1720
Blocked by: https://github.com/elastic/ci/pull/2312/files
2023-09-26 16:00:56 +03:00
Dimitrios Liappis
77d2ec31fa
[CI] Add initial buildkite pipeline for DRA (#15312)
Add initial buildkite pipeline for DRA artifacts.
This is a "hello-world" pipeline skeleton required to iterate on migrating the actual DRA jobs.
This commit also updates the backstage component for logstash to become a top level entity with the
necessary annotations and linked dependencies to pipelines.

Relates https://github.com/elastic/ingest-dev/issues/1720
2023-09-12 12:05:24 +03:00
kaisecheng
fb66e9888c
Fix serverless test for api protection (#15252) 2023-08-16 14:02:11 +01:00
kaisecheng
9af7c7cef4
Serverless test against restricted API key (#15224)
This commit changes the serverless tests to use a restricted API key with necessary permissions and disables Logstash legacy monitoring test.

Fixes: #15234

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-08-02 15:27:46 +01:00
kaisecheng
0f8695593e
buildkite serverless test (#15150)
This commit adds a Buildkite pipeline to test against serverless endpoint daily

Tests cover 
- es-output
- es-input
- es-filter
- central pipeline management
- legacy monitoring
- dlq
- integration-filter
- kibana API
- metricbeat stack monitoring

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: João Duarte <jsvduarte@gmail.com>
2023-07-19 17:21:53 +01:00
Mashhur
07b663561c
Snyk scans Logstash container vulnerabilities. (#15117)
* Snyk scans Logstash container vulnerabilities.

* Exclude integ test and tools when Snyk scanning.

* Remote repo url fix for main branch.

* Update .buildkite/scripts/snyk/report.sh

Simplify the logic to retrieve the version from `versions.yml`

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* Add backstage definition for Snyk Report pipeline.

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-07-12 14:54:03 -07:00
João Duarte
1022a8f63a
Update serverless_integration_pipeline.yml to invoke es output test 2023-06-28 14:58:24 +02:00
João Duarte
0a35754392
Delete serverless_pipeline.yml 2023-06-28 13:37:33 +02:00
João Duarte
caff3bf1ce
Rename serverless_integration_pipeline.yml.yml to serverless_integration_pipeline.yml 2023-06-27 16:54:34 +02:00
elastic-backstage-prod[bot]
a9112fc8f7
Create catalog-info file (#15072)
This will eventually replace the pipeline definition in the catalog repo, using the local file instead.

---------

Co-authored-by: elastic-backstage-prod[bot] <123036547+elastic-backstage-prod[bot]@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-27 12:29:30 +02:00
kaisecheng
e919305fee
placeholder for serverless test in buildkite (#15112)
Use any Buildkite agent for empty serverless pipeline.

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-06-26 22:11:46 +02:00
Mashhur
6f6a446f3c
Install Java on Buildkite Agent. (#15097) 2023-06-22 09:10:33 -07:00
Mashhur
e3b9324602
Read Snyk token from logstash repo scoped vault. (#15096) 2023-06-20 13:29:47 -07:00
Mashhur
9c080eac53
Snyk Integration (#15083)
* This commit includes number of changes:
- adds initial pipeline steps, each step proceeds one branch report job
- a script to resolve current and previous release latest branches from the release URL. Noting that it considers the branches from snapshots where upcoming releases will be our interest.
- pseudo logic to download logstash, build and report to Snyk. In order to script fully work we need a logstash machine to access Buildkite vault, which I am working.

* Source optimization and use Buildkite Vault to access to Snyk token.

* Add git branch and head to Snyk project tag.

* Dynamically resolve latest branches instead of manually defining.

* Update .buildkite/scripts/snyk/report.sh

Improve comment readability.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-20 08:25:21 -07:00