Reworked SQL Server installer on Travis CI

parent 9b75cd5f
......@@ -100,6 +100,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
......@@ -109,6 +110,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
......@@ -245,6 +247,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
......@@ -254,6 +257,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
......@@ -314,6 +318,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
......@@ -323,6 +328,7 @@ jobs:
services:
- docker
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
......
......@@ -2,12 +2,6 @@
set -ex
echo Installing drivers
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
sudo apt-get update
ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 mssql-tools unixodbc libssl1.0.0
echo Setting up Microsoft SQL Server
sudo docker pull microsoft/mssql-server-linux:2017-latest
......@@ -15,24 +9,10 @@ sudo docker run \
-e 'ACCEPT_EULA=Y' \
-e 'SA_PASSWORD=Doctrine2018' \
-p 127.0.0.1:1433:1433 \
--name db \
--name mssql \
-d \
microsoft/mssql-server-linux:2017-latest
retries=10
until (echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Doctrine2018 &> /dev/null)
do
if [[ "$retries" -le 0 ]]; then
echo SQL Server did not start
exit 1
fi
retries=$((retries - 1))
echo Waiting for SQL Server to start...
sleep 2s
done
sudo docker exec -i mssql bash <<< 'until echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Doctrine2018 > /dev/null 2>&1 ; do sleep 1; done'
echo SQL Server started
#!/usr/bin/env bash
set -ex
echo Installing driver dependencies
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
sudo apt-get update
ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 unixodbc unixodbc-dev libssl1.0.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment