Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ef3588c1
Commit
ef3588c1
authored
Mar 15, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docker: mssql and mssql tests blocks with common build context
parent
6503e482
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
14 deletions
+37
-14
docker/blocks/mssql/build/Dockerfile
+0
-0
docker/blocks/mssql/build/entrypoint.sh
+0
-0
docker/blocks/mssql/build/setup.sh
+13
-0
docker/blocks/mssql/build/setup.sql.template
+5
-5
docker/blocks/mssql/docker-compose.yaml
+5
-2
docker/blocks/mssql/setup.sh
+0
-6
docker/blocks/mssql_tests/docker-compose.yaml
+13
-0
pkg/services/sqlstore/sqlutil/sqlutil.go
+1
-1
No files found.
docker/blocks/mssql/Dockerfile
→
docker/blocks/mssql/
build/
Dockerfile
View file @
ef3588c1
File moved
docker/blocks/mssql/entrypoint.sh
→
docker/blocks/mssql/
build/
entrypoint.sh
View file @
ef3588c1
File moved
docker/blocks/mssql/build/setup.sh
0 → 100755
View file @
ef3588c1
#/bin/bash
#wait for the SQL Server to come up
sleep 15s
cat
/usr/setup/setup.sql.template | awk
'{
gsub(/%%DB%%/,"'
$MSSQL_DATABASE
'");
gsub(/%%USER%%/,"'
$MSSQL_USER
'");
gsub(/%%PWD%%/,"'
$MSSQL_PASSWORD
'")
}1'
>
/usr/setup/setup.sql
/opt/mssql-tools/bin/sqlcmd
-S
localhost
-U
sa
-P
$MSSQL_SA_PASSWORD
-d
master
-i
/usr/setup/setup.sql
\ No newline at end of file
docker/blocks/mssql/
setup.sql
→
docker/blocks/mssql/
build/setup.sql.template
View file @
ef3588c1
CREATE
LOGIN
grafana
WITH
PASSWORD
=
'Password!
'
CREATE LOGIN
%%USER%% WITH PASSWORD = '%%PWD%%
'
GO
CREATE
DATABASE
grafana
;
CREATE DATABASE
%%DB%%
;
GO
USE
grafana
;
USE
%%DB%%
;
GO
CREATE
USER
grafana
FOR
LOGIN
grafana
;
CREATE USER
%%USER%% FOR LOGIN %%USER%%
;
GO
EXEC
sp_addrolemember
'db_owner'
,
'
grafana
'
;
EXEC sp_addrolemember 'db_owner', '
%%USER%%
';
GO
docker/blocks/mssql/docker-compose.yaml
View file @
ef3588c1
mssql
test
:
mssql
:
build
:
context
:
blocks/mssql
context
:
blocks/mssql
/build
environment
:
ACCEPT_EULA
:
Y
MSSQL_SA_PASSWORD
:
Password!
MSSQL_PID
:
Express
MSSQL_DATABASE
:
grafana
MSSQL_USER
:
grafana
MSSQL_PASSWORD
:
Password!
ports
:
-
"
1433:1433"
...
...
docker/blocks/mssql/setup.sh
deleted
100644 → 0
View file @
6503e482
#/bin/bash
#wait for the SQL Server to come up
sleep 20s
/opt/mssql-tools/bin/sqlcmd
-S
localhost
-U
sa
-P
Password!
-d
master
-i
/usr/setup/setup.sql
\ No newline at end of file
docker/blocks/mssql_tests/docker-compose.yaml
0 → 100644
View file @
ef3588c1
mssqltests
:
build
:
context
:
blocks/mssql/build
environment
:
ACCEPT_EULA
:
Y
MSSQL_SA_PASSWORD
:
Password!
MSSQL_PID
:
Express
MSSQL_DATABASE
:
grafanatest
MSSQL_USER
:
grafana
MSSQL_PASSWORD
:
Password!
ports
:
-
"
1433:1433"
\ No newline at end of file
pkg/services/sqlstore/sqlutil/sqlutil.go
View file @
ef3588c1
...
...
@@ -14,7 +14,7 @@ type TestDB struct {
var
TestDB_Sqlite3
=
TestDB
{
DriverName
:
"sqlite3"
,
ConnStr
:
":memory:"
}
var
TestDB_Mysql
=
TestDB
{
DriverName
:
"mysql"
,
ConnStr
:
"grafana:password@tcp(localhost:3306)/grafana_tests?collation=utf8mb4_unicode_ci"
}
var
TestDB_Postgres
=
TestDB
{
DriverName
:
"postgres"
,
ConnStr
:
"user=grafanatest password=grafanatest host=localhost port=5432 dbname=grafanatest sslmode=disable"
}
var
TestDB_Mssql
=
TestDB
{
DriverName
:
"mssql"
,
ConnStr
:
"server=localhost;port=1433;database=grafana
_tests
;user id=grafana;password=Password!"
}
var
TestDB_Mssql
=
TestDB
{
DriverName
:
"mssql"
,
ConnStr
:
"server=localhost;port=1433;database=grafana
test
;user id=grafana;password=Password!"
}
func
CleanDB
(
x
*
xorm
.
Engine
)
{
if
x
.
DriverName
()
==
"postgres"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment