Skip to content
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

Return non-zero if any errors occur #53

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

andersonvom
Copy link
Contributor

Builds currently succeed whenever using the --download-artifacts flag, because exit_code is overridden with the return value of curl.

This initiates exit_code=0 and ensures that any errors will be accumulated to it as the build progresses. If any errors occur, either during the build or the downloading of artifacts, exit_code will have a non-zero value, which will ensure the script exits with an error code.

@andersonvom andersonvom force-pushed the fail-build-on-any-errors branch 2 times, most recently from 57e5440 to 3f74ce5 Compare September 12, 2024 20:16
@Azbagheri
Copy link
Collaborator

Hi @andersonvom thank you for your contribution! I'm considering merging this PR, but the develop branch has been updated. Can you please update your branch?

Builds currently succeed whenever using the `--download-artifacts` flag,
because `exit_code` is overridden with the return value of `curl`.

This initiates `exit_code=0` and ensures that any errors will be
accumulated to it as the build progresses. If any errors occur, either
during the build or the downloading of artifacts, `exit_code` will have
a non-zero value, which will ensure the script exits with an error code.
@andersonvom andersonvom force-pushed the fail-build-on-any-errors branch from 3f74ce5 to a3e5d34 Compare November 22, 2024 01:55
@andersonvom
Copy link
Contributor Author

Hey @Azbagheri! This was a busy week, but I've just rebased the MR! Please let me know there's anything else needed.

@Azbagheri
Copy link
Collaborator

Azbagheri commented Nov 22, 2024

Hey @andersonvom thank you for rebasing the PR. Going to merge it soon. This change will be available in the next release of gitrise which will go out this weekend. Thanks again for addressing the bug!

@Azbagheri Azbagheri merged commit 057f2a6 into Tumiya:develop Nov 22, 2024
2 checks passed
@Azbagheri Azbagheri linked an issue Nov 25, 2024 that may be closed by this pull request
@andersonvom andersonvom deleted the fail-build-on-any-errors branch November 25, 2024 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build is always succeeds when --download-artifacts is used
2 participants