-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db-test] Take DB init scripts from installer
- Loading branch information
Showing
6 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Copyright (c) 2020 Gitpod GmbH. All rights reserved. | ||
-- Licensed under the MIT License. See License-MIT.txt in the project root for license information. | ||
|
||
|
||
-- create test DB user | ||
SET @gitpodDbPassword = IFNULL(@gitpodDbPassword, 'test'); | ||
|
||
SET @statementStr = CONCAT( | ||
'CREATE USER IF NOT EXISTS "gitpod"@"%" IDENTIFIED BY "', @gitpodDbPassword, '";' | ||
); | ||
SELECT @statementStr ; | ||
PREPARE stmt FROM @statementStr; EXECUTE stmt; DEALLOCATE PREPARE stmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- Copyright (c) 2020 Gitpod GmbH. All rights reserved. | ||
-- Licensed under the MIT License. See License-MIT.txt in the project root for license information. | ||
|
||
-- Grant privileges | ||
GRANT ALL ON `gitpod%`.* TO "gitpod"@"%"; |
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
install/installer/pkg/components/database/incluster/init/BUILD.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
packages: | ||
- name: init-scripts | ||
type: generic | ||
srcs: | ||
- "*.sql" | ||
config: | ||
commands: | ||
- ["echo"] |