EvalAI
EvalAI copied to clipboard
Fix #4242: Updated Deploy and Pull scripts for TravisCI to report it as failed on issue
Expected Behaviour
Deploy and Pull Scripts should send exit code 1 when failure occurs
Actual Behaviour
From the example, deploy.sh script is sending exit code 0, which means success and Travis CI, in return make build successful.
Fix:
-
Deploy.sh: Create a function to check for AWS_ACCOUNT_ID, and this function will only be called for the cases which uses this variable, for others cases, it will not check for this value.
-
Pull.sh: if env is production/staging, and error occurs in build_and_push function, it exits with error code 1.
Codecov Report
Merging #4276 (7532340) into master (96968d6) will decrease coverage by
3.63%
. Report is 1101 commits behind head on master. The diff coverage isn/a
.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #4276 +/- ##
==========================================
- Coverage 72.93% 69.30% -3.63%
==========================================
Files 83 20 -63
Lines 5368 3574 -1794
==========================================
- Hits 3915 2477 -1438
+ Misses 1453 1097 -356
see 64 files with indirect coverage changes
see 64 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f705b19...7532340. Read the comment docs.
@abhi-bhatra I believe you have taken the wrong example from the PR i referenced. I was referring to this build https://app.travis-ci.com/github/Cloud-CV/EvalAI/builds/267908712#L7297 Which is on staging and when the script fails it still reports success. The exit 0 on master branch is completely fine and expected
Hi @Suryansh5545 you are referring to this build failure, where django installation failed, right ?
Hi @Suryansh5545 you are referring to this build failure, where django installation failed, right ?
@abhi-bhatra Yes, we want to make sure that if the scripts exits due to any kind of error then the exit is set to 1 instead of 0. To indicate failure of deployment
Hi @Suryansh5545 as you said that the exit 0 was just fine in deploy and push scripts and working as expected. Then, I believe there is an issue with Travis yml manifest.
There is a flag set -e
is set in both the scripts, which send a non-zero exit code immediately, the script fails on any step. I have set a travis_terminate 1; which exits the pipeline if any of the script is failed.
Kindly check the new changes pushed !