From 0ab6469187285368d9f64f9ec67dbbcfa3e5a901 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 15 May 2018 01:49:46 +0800 Subject: [PATCH] Grant privileges after database is created Never drop the database when granting privileges --- .gitlab-ci.yml | 3 +-- scripts/create_mysql_user.sh | 1 - scripts/create_postgres_user.sh | 4 +--- scripts/prepare_build.sh | 12 ++---------- scripts/utils.sh | 10 ++++++++++ 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 690e26711be..84d8e69b84e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -189,7 +189,7 @@ stages: <<: *dedicated-no-docs-and-no-qa-pull-cache-job <<: *use-pg variables: - CREATE_DB_USER: "true" + SETUP_DB: "false" script: # Manually clone gitlab-test and only seed this project in # db/fixtures/development/04_project.rb thanks to SIZE=1 below @@ -233,7 +233,6 @@ stages: .migration-paths: &migration-paths <<: *dedicated-no-docs-and-no-qa-pull-cache-job variables: - CREATE_DB_USER: "true" SETUP_DB: "false" script: - git fetch https://gitlab.com/gitlab-org/gitlab-ce.git v9.3.0 diff --git a/scripts/create_mysql_user.sh b/scripts/create_mysql_user.sh index 286b1325f1d..35f68c581f3 100644 --- a/scripts/create_mysql_user.sh +++ b/scripts/create_mysql_user.sh @@ -1,7 +1,6 @@ #!/bin/bash mysql --user=root --host=mysql <