Add exit status when create backup task fail
What does this MR do and why?
If Backup::DatabaseBackupError
or Backup::FileBackupError
is raised, set the exit code to 1
Related to #411497 (closed) , !124572 (comment 1521031152) and #411497 (comment 1804611929)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
bundle exec rake gitlab:backup:create exit status 0 on database error |
bundle exec rake gitlab:backup:create exit status 1 on database |
How to set up and validate locally
- Corrupt
gems/gitlab-backup-cli/lib/gitlab/backup/cli/utils/pg_dump.rb
with broken args for example add more-
to--clean
- run
bundle exec rake gitlab:backup:create SKIP=uploads,builds,artifacts,lfs,terraform_state,registry,pages,repositories,packages
-
echo $status
should get1
Edited by Phawin Khongkhasawan