Skip to content
Snippets Groups Projects
Commit 4ded2a7f authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Check if backup:create task exists for GitLab CI before attempting to use it.

parent cc5eb02a
No related branches found
No related tags found
1 merge request!411Check if backup:create task exists for GitLab CI before attempting to use it.
Loading
Loading
@@ -25,15 +25,18 @@ main() {
fi
 
if [ -d ${DEST_DIR}/service/ci-unicorn ] ; then
notify "Backing up GitLab CI SQL database"
if ! ${DEST_DIR}/bin/gitlab-ci-rake backup:create ; then
notify
notify "Backup failed! If you want to skip this backup, run the following command and"
notify "try again:"
notify
notify " sudo touch ${skip_migrations_file}"
notify
exit 1
if ${DEST_DIR}/bin/gitlab-ci-rake -T | grep backup:create ; then
# We are upgrading from a version which has CI backup task
notify "Backing up GitLab CI SQL database"
if ! ${DEST_DIR}/bin/gitlab-ci-rake backup:create ; then
notify
notify "Backup failed! If you want to skip this backup, run the following command and"
notify "try again:"
notify
notify " sudo touch ${skip_migrations_file}"
notify
exit 1
fi
fi
fi
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment