fail build if tine-install has a problem (rc != 0)
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 22 Mar 2016 19:53:18 +0000 (20:53 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 23 Mar 2016 09:44:15 +0000 (10:44 +0100)
Change-Id: I87a6584d5cf90df9ce682ffd2ce93ca07d292363
Reviewed-on: http://gerrit.tine20.com/customers/2948
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/build.xml

index 597cf6e..e163c27 100644 (file)
     <!-- ============================================  -->
     <target name="tine-install">
         <property file="${configdir}/install.properties" />
-        <echo msg="Installing Tine 2.0" />
+        <echo msg="Installing Tine 2.0 with initial admin '${adminLoginName}'" />
         <exec command="php -d include_path=.:${configdir} setup.php \
             --install -- \
                 adminLoginName=${adminLoginName} \
                 authentication=${authentication} \
                 accounts=${accounts} \
                 sieve=${sieve}
-" passthru="true"/>
+" passthru="true" returnProperty="return"/>
+        <if>
+        <equals arg1="${return}" arg2="0" />
+        <then>
+            <echo message="Installation successful" />
+        </then>
+        <else>
+            <fail message="Installation failed" />
+        </else>
+        </if>
     </target>
 
     <!-- ============================================  -->