diff options
author | Alexander Vladishev <aleksander.vladishev@zabbix.com> | 2022-03-09 10:43:12 +0300 |
---|---|---|
committer | Alexander Vladishev <aleksander.vladishev@zabbix.com> | 2022-03-09 10:43:12 +0300 |
commit | 78688648144de81c6db3e6bce6d38accb75cdf93 (patch) | |
tree | ef28f43dcedcf1bb94a7be0c5107d3cfd5e70c05 /build.xml | |
parent | 7453c307f5f3cd61dcc33852f1943dd729c08769 (diff) |
.......... [ZBXNEXT-686] updated Ant sript to prepare environment for DAST scanners
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/build.xml b/build.xml index 1379762e087..0ec62f796e8 100644 --- a/build.xml +++ b/build.xml @@ -14,10 +14,7 @@ <mkdir dir="runtime"/> </target> - <target name="create-configs" depends="init-common"> - <property name="url" value="${URL}"/> - <property name="screenshot_dir" value="${SCREENSHOT_DIR}"/> - <property name="screenshot_url" value="${SCREENSHOT_URL}"/> + <target name="create-frontend-configs"> <property name="dbtype" value="${DBTYPE}"/> <property name="dbhost" value="${DBHOST}"/> <property name="dbname" value="${DBNAME}"/> @@ -25,6 +22,24 @@ <property name="dbpassword" value="${DBPASSWORD}"/> <property name="phpunit_error_log" value="${PHPUNIT_ERROR_LOG}"/> <property name="phpunit_port_prefix" value="${PHPUNIT_PORT_PREFIX}"/> + + <!-- Create PHP config file --> + <copy overwrite="true" file="ui/tests/templates/zabbix.conf.php" tofile="ui/conf/zabbix.conf.php"/> + <replace file="ui/conf/zabbix.conf.php" token="{DBTYPE}" value="${dbtype}"/> + <replace file="ui/conf/zabbix.conf.php" token="{DBHOST}" value="${dbhost}"/> + <replace file="ui/conf/zabbix.conf.php" token="{DBNAME}" value="${dbname}"/> + <replace file="ui/conf/zabbix.conf.php" token="{DBUSER}" value="${dbuser}"/> + <replace file="ui/conf/zabbix.conf.php" token="{DBPASSWORD}" value="${dbpassword}"/> + <replace file="ui/conf/zabbix.conf.php" token="{PHPUNIT_ERROR_LOG}" value="${phpunit_error_log}"/> + <replace file="ui/conf/zabbix.conf.php" token="{SERVER_PORT}" value="${phpunit_port_prefix}51"/> <!-- 51 - CIntegrationTest::SERVER_PORT_SUFFIX --> + <chmod file="ui/conf/zabbix.conf.php" perm="go+rw"/> + </target> + + <target name="create-configs" depends="init-common,create-frontend-configs"> + <property name="url" value="${URL}"/> + <property name="screenshot_dir" value="${SCREENSHOT_DIR}"/> + <property name="screenshot_url" value="${SCREENSHOT_URL}"/> + <property name="phpunit_port_prefix" value="${PHPUNIT_PORT_PREFIX}"/> <property name="screenshot_references_dir" value="${SCREENSHOT_REFERENCES_DIR}"/> <condition property="phpunit_driver_address" value="${PHPUNIT_DRIVER_ADDRESS}" else="localhost"> <and> @@ -48,17 +63,6 @@ <replace file="ui/tests/bootstrap.php" token="{SCREENSHOT_REFERENCES_DIR}" value="${screenshot_references_dir}"/> <replace file="ui/tests/bootstrap.php" token="{PHPUNIT_DRIVER_ADDRESS}" value="${phpunit_driver_address}"/> <replace file="ui/tests/bootstrap.php" token="{PHPUNIT_DATA_SOURCES_DIR}" value="${basedir}/ui/tests/selenium/data/sources/"/> - - <!-- Create PHP config file --> - <copy overwrite="true" file="ui/tests/templates/zabbix.conf.php" tofile="ui/conf/zabbix.conf.php"/> - <replace file="ui/conf/zabbix.conf.php" token="{DBTYPE}" value="${dbtype}"/> - <replace file="ui/conf/zabbix.conf.php" token="{DBHOST}" value="${dbhost}"/> - <replace file="ui/conf/zabbix.conf.php" token="{DBNAME}" value="${dbname}"/> - <replace file="ui/conf/zabbix.conf.php" token="{DBUSER}" value="${dbuser}"/> - <replace file="ui/conf/zabbix.conf.php" token="{DBPASSWORD}" value="${dbpassword}"/> - <replace file="ui/conf/zabbix.conf.php" token="{PHPUNIT_ERROR_LOG}" value="${phpunit_error_log}"/> - <replace file="ui/conf/zabbix.conf.php" token="{SERVER_PORT}" value="${phpunit_port_prefix}51"/> <!-- 51 - CIntegrationTest::SERVER_PORT_SUFFIX --> - <chmod file="ui/conf/zabbix.conf.php" perm="go+rw"/> </target> <target name="create-saml-configs"> @@ -255,6 +259,8 @@ </exec> </target> + <target name="init-dast-postgresql" depends="create-frontend-configs,make-dbschema,create-db-postgresql"/> + <target name="make-binaries-mysql"> <!-- Binaries for integration tests --> <exec executable="./bootstrap.sh" failonerror="on"/> @@ -366,6 +372,8 @@ </exec> </target> + <target name="init-dast-mysql" depends="create-frontend-configs,make-dbschema,create-db-mysql"/> + <target name="test-phpunit" depends="init-common"> <exec executable="phpunit" dir="ui/tests/unit" failonerror="off"> <arg line="--log-junit=${basedir}/build/logs/phpunit.xml"/> @@ -413,6 +421,8 @@ <target name="build-api-postgresql" depends="init-api-postgresql,test-api"/> <target name="build-integration-mysql" depends="init-integration-mysql,test-integration"/> <target name="build-integration-postgresql" depends="init-integration-postgresql,test-integration"/> + <target name="build-dast-mysql" depends="init-dast-mysql"/> + <target name="build-dast-postgresql" depends="init-dast-postgresql"/> <!-- Default target --> <target name="build" depends="build-phpunit,build-mysql,build-postgresql,build-integration-mysql,build-integration-postgresql"/> |