-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] CI doesn't fail anymore if gradlew build
fails
#60
Labels
bug
Something isn't working
Comments
@reta says it's fixed |
i doubt that it's fixed - the CI script hasn't changed, so if the first command fails the second will still be executed and the CI step success then only depends on that. |
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). the easiest solution is to just run both gradle target in one go as one anyway depends on the other - there's no need to start gradle twice. this will also make the runs ever so slightly faster. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). the easiest solution is to just run both gradle target in one go as one anyway depends on the other - there's no need to start gradle twice. this will also make the runs ever so slightly faster. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). running it in two steps gives more visibilty to which step is failing. note that `publishPluginZipPublicationToZipStagingRepository` is tested explicitly to ensure that this step works as it has previously failed. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). running it in two steps gives more visibilty to which step is failing. note that `publishPluginZipPublicationToZipStagingRepository` is tested explicitly to ensure that this step works as it has previously failed. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). running it in two steps gives more visibilty to which step is failing. note that `publishPluginZipPublicationToZipStagingRepository` is tested explicitly to ensure that this step works as it has previously failed. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). running it in two steps gives more visibilty to which step is failing. note that `publishPluginZipPublicationToZipStagingRepository` is tested explicitly to ensure that this step works as it has previously failed. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
rursprung
added a commit
to rursprung/opensearch-plugin-template-java
that referenced
this issue
Jun 11, 2024
right now `./gradlew build` could fail but the script would still go on (because neither `set -e` is set nor `&&` is used to run both commands together). running it in two steps gives more visibilty to which step is failing. note that `publishPluginZipPublicationToZipStagingRepository` is tested explicitly to ensure that this step works as it has previously failed. fixes opensearch-project#60 Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the bug?
if
gradlew build
fails, the CI still happily continues and doesn't fail the build.How can one reproduce the bug?
cause e.g. the
javadoc
task to fail. as a real-world example see the windows build of aparo/opensearch-analysis-ik#25: https://github.com/aparo/opensearch-analysis-ik/actions/runs/6143965464/job/16668432218?pr=25What is the expected behavior?
if
gradlew build
fails the CI must failWhat is your host/environment?
n/a
Do you have any screenshots?
n/a
Do you have any additional context?
this was introduced in #31 by @prudhvigodithi. the problem is that there's another command coming after it, but the two are not joined by
&&
and no other mechanism is employed to cause the script to fail whenever any single step fails (e.g. usingset -e
):opensearch-plugin-template-java/.github/workflows/CI.yml
Lines 34 to 36 in 71bdf03
the simplest option however would probably be to just run
./gradlew build publishPluginZipPublicationToZipStagingRepository
(and why is
check
not called in the CI?)The text was updated successfully, but these errors were encountered: