diff options
author | Adam Baratz <adambaratz@php.net> | 2021-01-11 21:46:41 -0500 |
---|---|---|
committer | Adam Baratz <adambaratz@php.net> | 2021-01-11 21:46:41 -0500 |
commit | b5696980954007c75ca7fa1627897dfafb3d7fd7 (patch) | |
tree | 111fe83ed2a03c3d5a412af3a50682755dac77d7 /azure | |
parent | 65c789148b72e62d22fb23abaa1e0c97ba74c6da (diff) | |
download | php-git-b5696980954007c75ca7fa1627897dfafb3d7fd7.tar.gz |
Add MSSQL setup to Azure Pipelines build
Diffstat (limited to 'azure')
-rw-r--r-- | azure/apt.yml | 1 | ||||
-rw-r--r-- | azure/configure.yml | 1 | ||||
-rw-r--r-- | azure/coverage_job.yml | 1 | ||||
-rw-r--r-- | azure/file_cache_job.yml | 1 | ||||
-rw-r--r-- | azure/job.yml | 1 | ||||
-rw-r--r-- | azure/mssql.yml | 5 | ||||
-rw-r--r-- | azure/setup.yml | 1 | ||||
-rw-r--r-- | azure/test.yml | 3 |
8 files changed, 14 insertions, 0 deletions
diff --git a/azure/apt.yml b/azure/apt.yml index 8a28e6bcdb..8c21d1c45f 100644 --- a/azure/apt.yml +++ b/azure/apt.yml @@ -40,6 +40,7 @@ steps: postgresql-contrib \ snmpd \ snmp-mibs-downloader \ + freetds-dev \ unixodbc-dev \ llvm \ libc-client-dev \ diff --git a/azure/configure.yml b/azure/configure.yml index 3f5f98f596..2f7b28e15d 100644 --- a/azure/configure.yml +++ b/azure/configure.yml @@ -63,6 +63,7 @@ steps: --with-imap-ssl \ --with-pdo-odbc=unixODBC,/usr \ --with-pdo-firebird \ + --with-pdo-dblib \ --enable-werror \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d diff --git a/azure/coverage_job.yml b/azure/coverage_job.yml index 184ebcfafa..2b8ff10efc 100644 --- a/azure/coverage_job.yml +++ b/azure/coverage_job.yml @@ -10,6 +10,7 @@ jobs: pool: vmImage: 'ubuntu-18.04' steps: + - template: mssql.yml - template: apt.yml - script: | sudo -H pip install gcovr diff --git a/azure/file_cache_job.yml b/azure/file_cache_job.yml index 7c8b392a66..1c5fda3f80 100644 --- a/azure/file_cache_job.yml +++ b/azure/file_cache_job.yml @@ -10,6 +10,7 @@ jobs: pool: vmImage: 'ubuntu-18.04' steps: + - template: mssql.yml - template: apt.yml - template: configure.yml parameters: diff --git a/azure/job.yml b/azure/job.yml index f85744eede..f354c4d717 100644 --- a/azure/job.yml +++ b/azure/job.yml @@ -10,6 +10,7 @@ jobs: pool: vmImage: 'ubuntu-20.04' steps: + - template: mssql.yml - template: apt.yml - template: configure.yml parameters: diff --git a/azure/mssql.yml b/azure/mssql.yml new file mode 100644 index 0000000000..09b2af9617 --- /dev/null +++ b/azure/mssql.yml @@ -0,0 +1,5 @@ +# this template should be included close to the beginning, before setup.yml +# the container needs time to come up or the sqlcmd operation in setup.yml will have a login timeout +steps: + - script: docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 + displayName: 'Start MSSQL container' diff --git a/azure/setup.yml b/azure/setup.yml index 489df88159..21fccd415b 100644 --- a/azure/setup.yml +++ b/azure/setup.yml @@ -7,6 +7,7 @@ steps: mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test" sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" sudo -u postgres psql -c "CREATE DATABASE test;" + docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" displayName: 'Setup' - script: ./azure/setup-slapd.sh displayName: 'Configure slapd' diff --git a/azure/test.yml b/azure/test.yml index 4a1f97b734..95fa7b4a09 100644 --- a/azure/test.yml +++ b/azure/test.yml @@ -9,6 +9,9 @@ steps: export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test" export PDO_MYSQL_TEST_USER=root export PDO_MYSQL_TEST_PASS=root + export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0" + export PDO_DBLIB_TEST_USER="pdo_test" + export PDO_DBLIB_TEST_PASS="password" export TEST_PHP_JUNIT=junit.xml export REPORT_EXIT_STATUS=no export SKIP_IO_CAPTURE_TESTS=1 |