docker and appveyor to use MsSetup
This commit is contained in:
parent
e13b6e7528
commit
2ef70f1d0a
|
@ -68,12 +68,16 @@ RUN phpize && ./configure LDFLAGS="-lgcov" CXXFLAGS="-O0 --coverage" && make &&
|
||||||
|
|
||||||
# set name of sql server host to use
|
# set name of sql server host to use
|
||||||
WORKDIR $PHPSQLDIR/test/pdo_sqlsrv
|
WORKDIR $PHPSQLDIR/test/pdo_sqlsrv
|
||||||
RUN sed -i -e 's/localhost/sql/g' autonomous_setup.php
|
RUN sed -i -e 's/TARGET_SERVER/sql/g' MsSetup.inc
|
||||||
RUN sed -i -e 's/<YourStrong!Passw0rd>/'"$TEST_PHP_SQL_PWD"'/g' autonomous_setup.php
|
RUN sed -i -e 's/TARGET_SERVER/msphpsql_pdosqlsrv/g' MsSetup.inc
|
||||||
|
RUN sed -i -e 's/USERNAME/'"$TEST_PHP_SQL_UID"'/g' MsSetup.inc
|
||||||
|
RUN sed -i -e 's/PASSWORD/'"$TEST_PHP_SQL_PWD"'/g' MsSetup.inc
|
||||||
|
|
||||||
WORKDIR $PHPSQLDIR/test/sqlsrv
|
WORKDIR $PHPSQLDIR/test/sqlsrv
|
||||||
RUN sed -i -e 's/localhost/sql/g' autonomous_setup.php
|
RUN sed -i -e 's/TARGET_SERVER/sql/g' MsSetup.inc
|
||||||
RUN sed -i -e 's/<YourStrong!Passw0rd>/'"$TEST_PHP_SQL_PWD"'/g' autonomous_setup.php
|
RUN sed -i -e 's/TARGET_SERVER/msphpsql_sqlsrv/g' MsSetup.inc
|
||||||
|
RUN sed -i -e 's/USERNAME/'"$TEST_PHP_SQL_UID"'/g' MsSetup.inc
|
||||||
|
RUN sed -i -e 's/PASSWORD/'"$TEST_PHP_SQL_PWD"'/g' MsSetup.inc
|
||||||
|
|
||||||
ENV REPORT_EXIT_STATUS 1
|
ENV REPORT_EXIT_STATUS 1
|
||||||
ENV TEST_PHP_EXECUTABLE /usr/bin/php
|
ENV TEST_PHP_EXECUTABLE /usr/bin/php
|
||||||
|
|
|
@ -122,10 +122,10 @@ install:
|
||||||
- 7z x -y php-sdk-binary-tools-20110915.zip -o%PHP_SDK%
|
- 7z x -y php-sdk-binary-tools-20110915.zip -o%PHP_SDK%
|
||||||
- 7z x -y php.zip -o%PHP_SDK_DIR%
|
- 7z x -y php.zip -o%PHP_SDK_DIR%
|
||||||
- echo update SQL connection string
|
- echo update SQL connection string
|
||||||
- ps: (Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\autonomous_setup.php) | ForEach-Object { $_ -replace "localhost", ${env:TEST_PHP_SQL_SERVER} -replace "<YourStrong!Passw0rd>", ${env:TEST_PHP_SQL_PWD} } | Set-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\autonomous_setup.php
|
- ps: (Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\MsSetup.inc) | ForEach-Object { $_ -replace "TARGET_SERVER", ${env:TEST_PHP_SQL_SERVER} -replace "TARGET_DATABASE", ${env:PDOSQLSRV_DBNAME} -replace "USERNAME", ${env:TEST_PHP_SQL_UID} -replace "PASSWORD", ${env:TEST_PHP_SQL_PWD} } | Set-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\MsSetup.inc
|
||||||
- ps: Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\autonomous_setup.php
|
- ps: Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\pdo_sqlsrv\MsSetup.inc
|
||||||
- ps: (Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\autonomous_setup.php) | ForEach-Object { $_ -replace "localhost", ${env:TEST_PHP_SQL_SERVER} -replace "<YourStrong!Passw0rd>", ${env:TEST_PHP_SQL_PWD} } | Set-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\autonomous_setup.php
|
- ps: (Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\MsSetup.inc) | ForEach-Object { $_ -replace "TARGET_SERVER", ${env:TEST_PHP_SQL_SERVER} -replace "TARGET_DATABASE", ${env:SQLSRV_DBNAME} -replace "USERNAME", ${env:TEST_PHP_SQL_UID} -replace "PASSWORD", ${env:TEST_PHP_SQL_PWD} } | Set-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\MsSetup.inc
|
||||||
- ps: Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\autonomous_setup.php
|
- ps: Get-Content ${env:APPVEYOR_BUILD_FOLDER}\test\sqlsrv\MsSetup.inc
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- '"C:\\Program Files (x86)\\Microsoft Visual Studio %PHP_VC%.0\\VC\\vcvarsall.bat" %BUILD_PLATFORM%'
|
- '"C:\\Program Files (x86)\\Microsoft Visual Studio %PHP_VC%.0\\VC\\vcvarsall.bat" %BUILD_PLATFORM%'
|
||||||
|
|
|
@ -14,10 +14,10 @@ if (isset($_ENV['MSSQL_SERVER']) || isset($_ENV['MSSQL_USER']) || isset($_ENV['M
|
||||||
$databaseName = $_ENV['MSSQL_DATABASE_NAME'];
|
$databaseName = $_ENV['MSSQL_DATABASE_NAME'];
|
||||||
$DriverName = $_ENV['MSSQL_DRIVER_NAME'];
|
$DriverName = $_ENV['MSSQL_DRIVER_NAME'];
|
||||||
} else {
|
} else {
|
||||||
$server = 'SQL-2K12-SP3-1.galaxy.ad';
|
$server = 'TARGET_SERVER';
|
||||||
$uid = 'sa';
|
$uid = 'USERNAME';
|
||||||
$pwd = 'Moonshine4me';
|
$pwd = 'PASSWORD';
|
||||||
$databaseName = 'test_win123';
|
$databaseName = 'TARGET_DATABASE';
|
||||||
$DriverName = "ODBC Driver 11 for SQL Server";
|
$DriverName = "ODBC Driver 11 for SQL Server";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
*/
|
*/
|
||||||
$PhpDriver = "Microsoft SQL Server Driver for PHP";
|
$PhpDriver = "Microsoft SQL Server Driver for PHP";
|
||||||
|
|
||||||
$server = 'SQL-2K12-SP3-1.galaxy.ad';
|
$server = 'TARGET_SERVER';
|
||||||
$database = 'test_win123';
|
$dbName = 'TARGET_DATABASE';
|
||||||
$userName = 'sa';
|
$userName = 'USERNAME';
|
||||||
$userPassword = 'Moonshine4me';
|
$userPassword = 'PASSWORD';
|
||||||
|
|
||||||
$tableName = "php_test_table";
|
$tableName = "php_test_table";
|
||||||
$tableIndex = "php_test_table_index";
|
$tableIndex = "php_test_table_index";
|
||||||
|
|
Loading…
Reference in a new issue