Commit graph

99 commits

Author SHA1 Message Date
github-actions[bot]
3420d4c145
Allow running Java+Ruby tests on Windows separately (#15861) (#15887)
This commit allows separate running of Java and Ruby tests on Windows i.e. the same way as we currently do on unix (unit_tests.sh) via a cli argument.
If no argument has been supplied, both tests are run (as it does now).

The wrapper script is also rewritten from old batch style script to Powershell.

This work allows us to split the existing Windows CI job in a subsequent PR to separate steps, as we currently do on Linux.

Relates: https://github.com/elastic/logstash/issues/15566
(cherry picked from commit 8ac55184b8)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-01 10:40:44 +02:00
Dimitrios Liappis
e74c0679fd
Refactor qa/acceptance tests to get away from vagrant (#15696) (#15754)
This commit modernizes the qa/acceptance (packaging) test framework by
moving away from Vagrant and having the tests operate locally.

Relates: https://github.com/elastic/ingest-dev/issues/1722

(cherry picked from commit cebe4a7537)
2024-01-17 09:55:40 +02:00
github-actions[bot]
c998e4f091
[ci] aarch64 Buildkite pipeline part 2 (#15473) (#15506)
This commit is the follow up PR after #15466, which migrates away
the remaining aarch64 acceptance test Jenkins jobs to Buildkite.

Relates:

- #15466
- https://github.com/elastic/ingest-dev/issues/1724

(cherry picked from commit c384190718)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-26 09:39:17 +03:00
github-actions[bot]
fd3ffc1548
Backport PR #14786 to 7.17: Avoid to create and upload AARCH64 Docker images for UBI8 #14790
On ARM architecture UBI8 Docker images aren't created, so avoid to create empty tar.gz files.

(cherry picked from commit 7a39d97055)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-29 15:17:45 +01:00
github-actions[bot]
dac65a439e
Backport PR #14780 to 7.17: [DRA] Avoid to loose err code on docker save #14785
* [DRA] Force docker save to save directly on file instead of pipe to another command loosing the execution error code

(cherry picked from commit 2e5e49d10d)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-29 13:56:54 +01:00
github-actions[bot]
4e49539f06
DRA: Build dockerfiles for release (#14730) (#14732)
(cherry picked from commit 1dead06cdd)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-11-03 09:23:47 -04:00
github-actions[bot]
38642484d5
DRA: uploading missing docker-build-context files (#14722) (#14725)
(cherry picked from commit ef6852b687)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-11-02 18:57:50 -04:00
github-actions[bot]
a2d0da3f5a
DRA - Fix docker image build (#14706) (#14707)
Fix the docker image building and upload process:
 * Builds ubi8 on x86_64.
 * Uploads ironbank and ubi8 context files from x86_64 only.

(cherry picked from commit 2e8bd20cf5)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-26 11:23:15 -04:00
github-actions[bot]
2fa7c0d7f7
Backport PR #14703 to 7.17: Adds upload of missed docker docker-build-context.tar.gz artifacts #14704
Updates the dra_docker.sh script to upload also docker-build-context.tar.gz files

(cherry picked from commit 6ad5690a8c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-26 12:17:24 +02:00
github-actions[bot]
e2735bd29f
DRA - Fix error reporting (#14698) (#14700)
Ensures the DRA build script surfaces a rake error, instead of allowing the build to continue.

This ensures that the build doesn't continue if any of the steps fails.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
(cherry picked from commit 17d0bb5ffb)
2022-10-25 18:40:01 -04:00
github-actions[bot]
53da859769
DRA - generalize docker image building (#14670) (#14689)
* Generalize docker image building
* Rename and add ability to pass the architecture as a parameter
* Handle ARCH env variable

(cherry picked from commit 6ba5cc112f)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-24 21:23:19 -04:00
github-actions[bot]
6a8b525514
DRA - fix dra_upload syntax, breaking builds (#14685) (#14686)
Fix dra_upload.sh syntax that's breaking the build.

(cherry picked from commit 9584d1332b)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-22 13:04:53 -04:00
github-actions[bot]
50a0500512
Backport PR #14677 to 7.17: [DRA] Don't download Darwin arrch64 for 7.17 #14678
Version 7.17 doesn't generate Darwin aarch64 artifacts. Don't download these artifacts from the GCS bucket, given that we don't build Darwin for that release.

(cherry picked from commit 9c7b7b7454)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-20 17:18:29 +02:00
Andres Rodriguez
5c30a394af
Manually backport #14654, #14657, #14659 (#14665)
* DRA: Improve shell scripts for debuggability (#14654). The changes remove some code duplication by introducing a common file that can be sourced between all scripts. It also improves debuggability by adding better messages.
* Fix dra_common sourcing (#14657). Fixes the source of dra_common.sh. It will now first check the directory of the file from which this dra_common.sh script is being called. This allows the common script to be sourced regardless of where the sourcing script is being called from.
* Fix sourcing on dra_upload (#14659). Fix sourcing on dra_upload.sh
2022-10-17 18:30:18 -04:00
github-actions[bot]
a441638474
DRA: Handle env variables better (#14644) (#14653)
* DRA: Handle env variables better
* Moved the addition of SNAPSHOT suffix to the version after the VERSION_QUALIFIER
* Fix badly assigned variable, version qualifier has to be appended also to PLAIN_STACK_VERSION and not RELEASE_VER

Co-authored-by: andsel <selva.andre@gmail.com>
(cherry picked from commit db6a7bc619)
2022-10-13 14:04:04 -04:00
github-actions[bot]
2369e16fc1
Backport PR #14645 to 7.17: Avoid to pass SNAPSHOT particle to the version passed to release-manager #14649
The version passed to the release-manager doesn't need the SNAPSHOT particle because already handled by the --workflow="snapshot", if inserted make the release manager to search for artifacts named as 8.5.0-SNAPSHOT-SNAPSHOT

(cherry picked from commit b8792107ad)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-13 12:54:18 +02:00
github-actions[bot]
3c98813855
Backport PR #14646 to 7.17: Follow up PR of #14645, adds version qualifier to the plain version #14650
(cherry picked from commit cb76c685b7)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-13 12:52:54 +02:00
github-actions[bot]
f3fdcb3d80
dra_upload.sh: Leave artifacts under build/ (#14639) (#14641)
Do not move out artifacts from the build/ former to ensure the upload doesn't fail.

(cherry picked from commit 363adad3b6)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-12 14:41:45 -04:00
github-actions[bot]
3d85ea439d
Backport PR #14636 to 7.17: Fix/dra use another technique to extract branch name #14638
Avoid to leverage on git local commands to guess the local branch, it switches to listing the branches and checking against the the stack version. If doesn't exists it's main

(cherry picked from commit 11ecaaea5a)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-12 14:56:24 +02:00
github-actions[bot]
60765f5ad1
Backport PR #14626 to 7.17: Re-added execution rights to dra_upload.sh #14635
Re-apply execution permission to DRA upload script

(cherry picked from commit 63d5658015)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-12 11:27:24 +02:00
github-actions[bot]
f6d40866a7
Backport PR #14619 to 7.17: Switch branch slector from major.minor to read the current branch name #14625
Switch branch selector from major.minor to read the current branch name

(cherry picked from commit ff8afb2293)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-11 20:10:03 +02:00
github-actions[bot]
428cd00f9d
Backport PR #14600 to 7.17: Updates DRA scripts to build snapshot artifacts #14621
Handle the WORKFLOW_TYPE enviroment variable used to select the kind of artifacts to generate and consequently adapt the version name.
If the WORKFLOW_TYPE has a value assigned other then empty string it's assumed to be snapshot and so it generates snapshot artifacts else the release ones.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
(cherry picked from commit d8d690079a)
2022-10-11 18:16:36 +02:00
github-actions[bot]
eff28defc1
Backport PR #14589 to 7.17: DRA - Update scripts to use the version qualifier in stack_version
Update DRA scripts to use the version qualifier in stack_version variable for alpha and beta builds

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 3075029b27)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-11 09:45:38 +02:00
github-actions[bot]
0728acd6ef
Extract the branch name passed to release-manager from version file (#14592) (#14610)
* Extract the branch name passed to release-manager from version and not from git current branch

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
(cherry picked from commit d3b92ec20c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-10 14:08:35 +02:00
Andrea Selva
fcebc84826
Avoid to upload not created artifacts for Darwin AARCH64 in 7.17 (#14596) 2022-10-05 13:42:02 +02:00
Andrea Selva
fbf746b8a8
Backport dra 7.17 (#14588)
This is a **not clean backport** of the following PRs to `8.5` branch:

- Introduces a bash script to build all the artifacts and dependencies report. #14522
- Save docker images as tar.gz files move the CSV dependency report in the path that's expected by release-manager #14552 
- Split ci scripts into ARM and x86 ones #14567
- Uses the gsutil tool to upload all the generated artifacts into an intermediate collector bucket. #14568 
- Collect all artifacts created and upload to GCP with release-manager #14584
2022-10-04 09:50:41 +02:00
Rob Bavey
2ac869a9c4
Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "norm… (#13140)
* Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "normalize" platform on plugin changes

Backport PR #13015 to 7.x branch. Original Message:

This PR enables the upgrade of bundler to the latest version.

Prior to this PR, the ability to do so was blocked by bundler.setup in versions of bundler > `2.23` making runtime changes to `Gemfile.lock` (unless the lock file was `frozen`) based on the specific platform the application was being run on, overriding any platforms (including generic `java` platform) set during build time. This was in conflict with changes made in #12782, which prevented the logstash user writing to files in `/usr/share/logstash`.

This PR will freeze the lockfile when logstash is run, and unfreeze it when manipulating plugins (install, update, remove, install from offline pack) to allow new plugins to be added. While unfrozen, changes are also made to ensure that the platform list remains as the generic `java` platform, and not changed to the specific platform for the runtime JVM.

This PR also introduces a new runtime flag, `--enable-local-plugin-development`. This flag is intended for use by Logstash developers only, and enables a mode of operation where a Gemfile can be manipulated, eg

```
gem "logstash-integration-kafka", :path => '/users/developer/code/plugins/logstash-integration-kafka'
```

to facilitate quick and simple plugin testing.

This PR also sets the `silence_root_warning` flag to avoid bundler printing out alarming looking warning messages when `sudo` is used. This warning message was concerning for users - it would be printed out during normal operation of `bin/logstash-plugin install/update/remove` when run under `sudo`, which is the expected mode of operation when logstash is installed to run as a service via rpm/deb packages.

This PR also updates the vagrant based integration tests to ensure that Logstash still runs after plugin update/install/remove operations, fixes up some regular expressions that would cause test failures, and removes some dead code from tests.

* Updated Bundler to latest version
* Ensured that `Gemfile.lock` are appropriately frozen
* Added new developer-only flag to facilitate local plugin development to allow unfrozen lockfile in a development environment

(cherry picked from commit 4707cb)

* Remove code pinning bundler to ~> 1.17
2021-08-17 20:31:26 -04:00
Rob Bavey
0772e72fa8 Minor fixes to acceptance and docker test scripts 2020-08-20 14:35:48 +00:00
Rob Bavey
ef1352ef53 Add UBI8 docker image to artifacts
This commit adds the rake docker_ubi8 rake task, and associated
changes to the docker template and makefiles.

This commit also refactors the acceptance tests to extract xpack tests
into a helper class to allow the same tests to be used in both 'full'
and 'ubi8' docker image tests
2020-08-20 14:35:48 +00:00
Rob Bavey
e8385738c5
7x Introduce integration tests for docker images (#12157)
Clean backport of #12135

This commit adds integration tests for the Logstash docker images. Previous
integration tests were removed in https://github.com/elastic/logstash/pull/10693,
due to the tests being non functional.

The commit adds image and container tests. The image tests check the contents and the
metadata of the image; the container tests check the logstash process, and includes tests
ensuring that logstash runs, and is configurable.

This test also adds a ci script to allow the tests to be run on jenkins, and to split the
running of these tests up based on the image type and includes updates to the rake tasks to
support this.
2020-08-03 09:43:09 -04:00
Joao Duarte
dc412713ef add ci script setup dependencies
This script can be useful for preparing the environment for
services like code scanners.
2020-07-16 09:09:53 +00:00
andsel
326b1c1ed1 Pass FEATURE_FLAG as Docker environment variable
Some QA tests reads the FEATURE_FLAG environment variable, for example to test PQ functionality.
This PR passthrough the environement variable inside the Docker instance.

Fixes #11970
2020-06-05 13:39:08 +00:00
Andrea Selva
c5b6a853d6
Introduced JDK environment variable to explicitly pass the JAVA_HOME to use and defined .ci/ with OS and JDK preferences (#11934) 2020-05-27 16:48:39 +02:00
Rob Bavey
ba78c05e0d
[7.x] Backport JDK Unit Testing Matrices (#11839)
* Defined the versions of JDK to use in test build separated by OS (#11768)

* Added JDK 11 and 14 to Unix testing matrix (#11801)

- OpenJDK14 AdoptOpenJDK11 Zulu11
- OpenJDK14 AdoptOpenJDK14 Zulu14

Close #11801

Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2020-04-28 09:31:57 -04:00
Rob Bavey
0eb2f54de2
Update gradle version to 6.3 (#11742) (#11761)
* Backport of #11742. Not a clean backport as 7.x had not previously been upgraded to 5.6.4 as master had been.

* Update gradle version to 6.3

Gradle versions prior to 6.3 cannot run under JDK14.
This commit upgrades the version of Gradle to 6.3, and removes all deprecation warnings that can currently be removed.

Changes include:
* Increase gradle memory to 2g
* Increase gradle memory in the license check job to 2g
* Replace use of `testCompile`
* Replace `runtime` with `runtimeOnly`
* Remove`compile` depedencies from gradle files
* Replace deprecated archive methods
* Fix dependencies report build
* Make jruby dependencies 'api', fix archiveVersion
* Set `duplicatesStrategy` for all tasks of type Copy
* Use `configureEach` for global 'withType' calls
** Use the recommended Tasks API calls
(https://blog.gradle.org/preview-avoiding-task-configuration-time)
* Run `./gradlew wrapper` earlier to improve caching
* Use copy with chown for resources that need to be run during `./gradlew wrapper`
2020-04-08 09:00:34 -04:00
Joao Duarte
f12eb2f28a fail license report job on missing licenses
Fixes #11554
2020-01-31 12:36:41 +00:00
João Duarte
38e5e53def
Update logstash_releases.json (#10366) 2019-01-30 16:50:40 +00:00
João Duarte
a163b86c0b
Update logstash_releases.json 2018-12-12 11:25:49 +00:00
João Duarte
5c919f2831
Update logstash_releases.json 2018-12-09 09:59:49 +00:00
João Duarte
14a061431f
add reference json file with logstash releases (#10173) 2018-11-22 23:27:50 +00:00
Josh Soref
c6cd247ec3 Multiple spelling corrections (#9782)
* spelling: actually
* spelling: already
* spelling: concurrency
* spelling: constructor
* spelling: destinations
* spelling: different
* spelling: elasticsearch
* spelling: encoding
* spelling: error
* spelling: explicitly
* spelling: failings
* spelling: falsey
* spelling: guarantees
* spelling: having
* spelling: implementation
* spelling: logstash
* spelling: module
* spelling: multiple
* spelling: omitted
* spelling: overridden
* spelling: pipeline
* spelling: raspberry
* spelling: receive
* spelling: recommended
* spelling: registered
* spelling: registering
* spelling: shutdown
* spelling: signal
* spelling: specified
* spelling: successful
* spelling: successfully
* spelling: valuefied
* spelling: vector
2018-07-04 10:41:10 +01:00
Ry Biesemeyer
5b1cd67311 ci: ensure bundle installed before invoking bundle exec in cleanup
DRYs up cleanup code and prevents error that is raised when we attempt
to `bundle exec rake qa:vm:halt` when the bundle has not yet been installed.

Fixes #9803
2018-07-02 17:26:27 +00:00
Armin
0f1be10565 BUILD: Force utf-8 file encoding in java compilation
Fixes #9685
2018-05-30 09:53:57 +00:00
Andrew Cholakian
eae1cc0d0a Correctly CD between dirs in ci/acceptance-tests.sh
This correctly CDs back and forth between dirs and tracks things
with variables to make it easier on the brain than relative paths like '..'

Fixes #9657
2018-05-24 19:49:30 +00:00
Andrew Cholakian
03427d81a2 Fix VM halt task for acceptance tasks by CDing correctly
We were in the wrong dir before, we need to be in the qa dir to shutdown correctly

Fixes #9651
2018-05-24 14:01:31 +00:00
Andrew Cholakian
f8afd2fb39 Make commands to run all acceptance VMs actually do that.
Also, take conservative approach of halting any somehow stale VMs before building

Fixes #9642
2018-05-23 19:23:39 +00:00
Andrew Cholakian
55cd1875a2 Always halt vagrant instances when on CI server.
We were having issues with lots of stale VMs being left around. This, hopefully, fixes it.

Fixes #9642
2018-05-23 19:23:39 +00:00
Andrew Cholakian
e2a6d8b753 Enable TEST_DEBUG on CI servers
Some tests are impossible to debug since log messages are not echoed without this,
including fatal/error messages. This makes output more verbose, but actually debuggable.

We should really delete this 'functionality' from https://github.com/elastic/logstash-devutils/blob/master/lib/logstash/devutils/rspec/spec_helper.rb#L36
since it does more harm than good.

Fixes #9629
2018-05-22 14:50:34 +00:00
Andrew Cholakian
bf21f97eb3 Fix the license check CI task
This does a few small things:

1. Prefer invoking rake tasks via ./gradlew vs rake. This prevents Java from segfaulting on docker for unknown reasons
2. Remove use of COPYING.csv which has already been removed

Fixes #9583
2018-05-15 23:31:12 +00:00
Armin
b9cd58639c BUILD: Fix the docker build script to correctly see exit code
Fixes #9567
2018-05-14 02:37:26 +00:00