forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 98918_remove_test_logging
- Loading branch information
Showing
626 changed files
with
8,923 additions
and
3,525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
STATUS=$(curl -s "https://api.github.com/repos/elastic/elasticsearch/branches/$BUILDKITE_BRANCH" | jq '.protected') | ||
echo "Branch $BUILDKITE_BRANCH protection status is: $STATUS" | ||
if [[ "$STATUS" == "false" ]]; then | ||
echo "Development branch $BUILDKITE_BRANCH is not set as protected in GitHub but should be." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...d-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.gradle.internal.docker; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* This class models the result of running a command. It captures the exit code, standard output and standard error and allows | ||
* applying String filter for stdout as this is intended to create configuration cache compatible output which | ||
* aims to be agnostic. | ||
*/ | ||
public class DockerResult { | ||
|
||
private int exitCode; | ||
private String stdout; | ||
private String stderr; | ||
|
||
public DockerResult(int exitCode, String stdout, String stderr) { | ||
this.exitCode = exitCode; | ||
this.stdout = stdout; | ||
this.stderr = stderr; | ||
} | ||
|
||
public int getExitCode() { | ||
return exitCode; | ||
} | ||
|
||
public String getStdout() { | ||
return stdout; | ||
} | ||
|
||
public String getStderr() { | ||
return stderr; | ||
} | ||
|
||
public void setExitCode(int exitCode) { | ||
this.exitCode = exitCode; | ||
} | ||
|
||
public void setStdout(String stdout) { | ||
this.stdout = stdout; | ||
} | ||
|
||
public void setStderr(String stderr) { | ||
this.stderr = stderr; | ||
} | ||
|
||
public boolean isSuccess() { | ||
return exitCode == 0; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
DockerResult that = (DockerResult) o; | ||
return exitCode == that.exitCode && Objects.equals(stdout, that.stdout) && Objects.equals(stderr, that.stderr); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(exitCode, stdout, stderr); | ||
} | ||
} |
Oops, something went wrong.