Add optional pull request check for running with entitlements enabled (#118693)

This commit is contained in:
Mark Vieira 2024-12-13 13:13:44 -08:00 committed by GitHub
parent 0a6ce27825
commit e454d74de4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 57 additions and 4 deletions

View file

@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-1-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart1
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk

View file

@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-2-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart2
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk

View file

@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-3-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart3
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk

View file

@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-4-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart4
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk

View file

@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-5-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart5
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk

View file

@ -876,10 +876,8 @@ public class ElasticsearchNode implements TestClusterConfiguration {
// Don't inherit anything from the environment for as that would lack reproducibility // Don't inherit anything from the environment for as that would lack reproducibility
environment.clear(); environment.clear();
environment.putAll(getESEnvironment()); environment.putAll(getESEnvironment());
if (cliJvmArgs.isEmpty() == false) {
String cliJvmArgsString = String.join(" ", cliJvmArgs); String cliJvmArgsString = String.join(" ", cliJvmArgs);
environment.put("CLI_JAVA_OPTS", cliJvmArgsString); environment.put("CLI_JAVA_OPTS", cliJvmArgsString + " " + System.getProperty("tests.jvm.argline", ""));
}
// Direct the stderr to the ES log file. This should capture any jvm problems to start. // Direct the stderr to the ES log file. This should capture any jvm problems to start.
// Stdout is discarded because ES duplicates the log file to stdout when run in the foreground. // Stdout is discarded because ES duplicates the log file to stdout when run in the foreground.