From 8870afedb7308ab5630e390106bd8d88630f7c45 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 9 Oct 2018 14:21:42 +0800 Subject: [PATCH] fix mssql drone ci --- .drone.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 84cef679..ea72b0aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,9 +31,8 @@ services: - ACCEPT_EULA=Y - SA_PASSWORD=yourStrong(!)Password - MSSQL_PID=Developer - commands: - - echo 'CREATE DATABASE xorm_test' > create.sql - - /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "yourStrong(!)Password" -i "create.sql" + when: + event: [push, tag, pull_request] matrix: GO_VERSION: @@ -54,6 +53,12 @@ pipeline: - | psql -U postgres -d xorm_test -h pgsql \ -c "create schema xorm;" + + init_mssql: + image: microsoft/mssql-server-linux:2017-CU11 + commands: + - echo 'CREATE DATABASE xorm_test' > create.sql + - /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "yourStrong(!)Password" -i "create.sql" build: image: golang:${GO_VERSION}