ci: install msodbcsql17 drier data bridge

This commit is contained in:
JimMoen 2023-04-11 03:41:40 +08:00
parent 27fdf644aa
commit 59433b8b33
No known key found for this signature in database
GPG Key ID: 87A520B4F76BA86D
1 changed files with 12 additions and 0 deletions

12
scripts/install-odbc-driver.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
## this script install msodbcsql17 and unixodbc-dev on ci environment
set -euo pipefail
# install msodbcsql17
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev && \
## and not needed to modify /etc/odbcinst.ini
## docker-compose will mount one in .ci/docker-compose-file/odbc
sed -i 's/ODBC Driver 17 for SQL Server/ms-sql/g' /etc/odbcinst.ini