Skip to content

Commit e454d74

Browse files
authored
Add optional pull request check for running with entitlements enabled (#118693)
1 parent 0a6ce27 commit e454d74

File tree

6 files changed

+57
-4
lines changed

6 files changed

+57
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
allow-labels: "test-entitlements"
3+
steps:
4+
- label: part-1-entitlements
5+
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart1
6+
timeout_in_minutes: 300
7+
agents:
8+
provider: gcp
9+
image: family/elasticsearch-ubuntu-2004
10+
machineType: custom-32-98304
11+
buildDirectory: /dev/shm/bk
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
allow-labels: "test-entitlements"
3+
steps:
4+
- label: part-2-entitlements
5+
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart2
6+
timeout_in_minutes: 300
7+
agents:
8+
provider: gcp
9+
image: family/elasticsearch-ubuntu-2004
10+
machineType: custom-32-98304
11+
buildDirectory: /dev/shm/bk
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
allow-labels: "test-entitlements"
3+
steps:
4+
- label: part-3-entitlements
5+
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart3
6+
timeout_in_minutes: 300
7+
agents:
8+
provider: gcp
9+
image: family/elasticsearch-ubuntu-2004
10+
machineType: custom-32-98304
11+
buildDirectory: /dev/shm/bk
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
allow-labels: "test-entitlements"
3+
steps:
4+
- label: part-4-entitlements
5+
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart4
6+
timeout_in_minutes: 300
7+
agents:
8+
provider: gcp
9+
image: family/elasticsearch-ubuntu-2004
10+
machineType: custom-32-98304
11+
buildDirectory: /dev/shm/bk
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
allow-labels: "test-entitlements"
3+
steps:
4+
- label: part-5-entitlements
5+
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart5
6+
timeout_in_minutes: 300
7+
agents:
8+
provider: gcp
9+
image: family/elasticsearch-ubuntu-2004
10+
machineType: custom-32-98304
11+
buildDirectory: /dev/shm/bk

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,10 +876,8 @@ private void startElasticsearchProcess() {
876876
// Don't inherit anything from the environment for as that would lack reproducibility
877877
environment.clear();
878878
environment.putAll(getESEnvironment());
879-
if (cliJvmArgs.isEmpty() == false) {
880-
String cliJvmArgsString = String.join(" ", cliJvmArgs);
881-
environment.put("CLI_JAVA_OPTS", cliJvmArgsString);
882-
}
879+
String cliJvmArgsString = String.join(" ", cliJvmArgs);
880+
environment.put("CLI_JAVA_OPTS", cliJvmArgsString + " " + System.getProperty("tests.jvm.argline", ""));
883881

884882
// Direct the stderr to the ES log file. This should capture any jvm problems to start.
885883
// Stdout is discarded because ES duplicates the log file to stdout when run in the foreground.

0 commit comments

Comments
 (0)