zend-patterns / ZendServerBamboo

Bamboo Plugin for packaging and deploying to Zend Server
Other
14 stars 3 forks source link

Zend Server Deployment Check Task - Required Fields and Fails on ZS 8.5 #12

Closed PhearZero closed 8 years ago

PhearZero commented 8 years ago

There is a missing * required field on Zend Server Version paramater. Also, when doing a post deployment status check, this error occurs:

23-Sep-2015 16:57:52 Starting task 'Zend Server Deployment Check Task' of type 'org.zend.zendserver.bamboo.plugin.zendserver:ZendServerDeploymentCheckTask' 23-Sep-2015 16:57:52 Preparing test runs (in Bamboo-Deploy context). 23-Sep-2015 16:57:57 /home/bamboo/xml-data/build-dir/1703943-1769482/installApp-null.xml 23-Sep-2015 16:57:57 Finished task 'Zend Server Deployment Check Task' with result: Failed 23-Sep-2015 16:57:57 Finalising the build... 23-Sep-2015 16:57:57 Stopping timer.

janatzend commented 8 years ago

Thanks for notifying.

Added the required field in #13. Please try the updated jar file.

However, I couldn't see any issues with the Deployment Check Task. Could you please provide the command which has been executed (you can find it in the logs) plus the output generated by this command?

If you're not interested in the Rollback functionality of the Check Task, you can also try the '--wait' custom param which can be added in the Deployment Task definition. The Deployment Task itself will wait until the deployment has finished.

PhearZero commented 8 years ago

That's the main issue it is not executing any command to use. I've been able to use the sdk to figure out most of the errors but this one has got me, this is what I've go so far from a fresh run with the latest. Same as before, the output log for the 'Zend Server Deployment Check Task' does not match the current deployment like the 'Zend Server Deployment Task'. I am getting a installApp-null.xml vs installApp-5.xml as an export to a non-existant command that is run. I've added whitespace to the log for clarity and included the deployment task logs below.

30-Sep-2015 11:22:12 Starting task 'Zend Server Deployment Task' of type 'org.zend.zendserver.bamboo.plugin.zendserver:ZendServerDeploymentTask' 30-Sep-2015 11:22:12 Deployment (in Bamboo-Deploy context) has started... 30-Sep-2015 11:22:17 Searching for ZPK file from custom definition 30-Sep-2015 11:22:17 No custom ZPK file specified. 30-Sep-2015 11:22:17 Searching for ZPK file from Artifact Download 30-Sep-2015 11:22:17 Artifact Downloader Task found 30-Sep-2015 11:22:17 ZPK directory configuration found: 30-Sep-2015 11:22:17 ZPK found: /home/bamboo/xml-data/build-dir/3768321-3866625/5.zpk 30-Sep-2015 11:22:17 Set Process Timeout to 60 sec 30-Sep-2015 11:22:31 Process command line: /usr/local/bin/zs-client installApp --zpk=/home/bamboo/xml-data/build-dir/3768321-3866625/5.zpk --baseUri=http://testing.avian-x.com --userAppName=avianx-com --zsurl=http://52.88.230.228:10081 --zskey= --zssecret= --zsversion=8.5 30-Sep-2015 11:22:31 Output written to: /home/bamboo/xml-data/build-dir/3768321-3866625/installApp-5.xml 30-Sep-2015 11:22:31 Checking Zend Server output for errors 30-Sep-2015 11:22:31 Finished task 'Zend Server Deployment Task' with result: Success

30-Sep-2015 11:22:31 Starting task 'Zend Server Deployment Check Task' of type 'org.zend.zendserver.bamboo.plugin.zendserver:ZendServerDeploymentCheckTask' 30-Sep-2015 11:22:31 Preparing test runs (in Bamboo-Deploy context).

30-Sep-2015 11:22:37 /home/bamboo/xml-data/build-dir/3768321-3866625/installApp-null.xml

30-Sep-2015 11:22:37 Finished task 'Zend Server Deployment Check Task' with result: Failed

janatzend commented 8 years ago

installApp-null.xml is weird... it should get the same file name as used in the Deployment Task. In this case there should be a '5' instead of 'null', which is the build number - obviously not available for the Check Task. Are the both jobs running in the same stage?

However, in my forked private repo https://github.com/janatzend/ZendServerBamboo/tree/master/target you can find a jar file with more verbose debug output. I'd like to see at which step the Check Task fails.

Thanks, Jan

PhearZero commented 8 years ago

Agreed! Both jobs are on the same deployment env "Staging". The build stages are curretly lint->package and the zpk is the artifact of package. Not sure what's going on but I was able to get the version bump but no verbose outputs, below is todays run with 1.2.2-debug

Starting task 'Zend Server Deployment Task' of type 'org.zend.zendserver.bamboo.plugin.zendserver:ZendServerDeploymentTask' 01-Oct-2015 09:08:38 Deployment (in Bamboo-Deploy context) has started... 01-Oct-2015 09:08:43 Searching for ZPK file from custom definition 01-Oct-2015 09:08:43 No custom ZPK file specified. 01-Oct-2015 09:08:43 Searching for ZPK file from Artifact Download 01-Oct-2015 09:08:43 Artifact Downloader Task found 01-Oct-2015 09:08:43 ZPK directory configuration found: 01-Oct-2015 09:08:43 ZPK found: /home/bamboo/xml-data/build-dir/3768321-3866625/5.zpk 01-Oct-2015 09:08:43 Set Process Timeout to 60 sec 01-Oct-2015 09:08:52 Process command line: /usr/local/bin/zs-client installApp --zpk=/home/bamboo/xml-data/build-dir/3768321-3866625/5.zpk --baseUri=http://testing.avian-x.com --userAppName=avianx-com --zsurl=http://52.88.230.228:10081 --zskey= --zssecret=--zsversion=8.5 01-Oct-2015 09:08:52 Output written to: /home/bamboo/xml-data/build-dir/3768321-3866625/installApp-5.xml 01-Oct-2015 09:08:52 Checking Zend Server output for errors 01-Oct-2015 09:08:52 Finished task 'Zend Server Deployment Task' with result: Success

01-Oct-2015 09:08:52 Starting task 'Zend Server Deployment Check Task' of type 'org.zend.zendserver.bamboo.plugin.zendserver:ZendServerDeploymentCheckTask' 01-Oct-2015 09:08:52 Preparing test runs (in Bamboo-Deploy context).

01-Oct-2015 09:08:57 /home/bamboo/xml-data/build-dir/3768321-3866625/installApp-null.xml

01-Oct-2015 09:08:57 Finished task 'Zend Server Deployment Check Task' with result: Failed 01-Oct-2015 09:08:57 Finalising the build... 01-Oct-2015 09:08:57 Stopping timer. 01-Oct-2015 09:08:57 Build 3768321-3866625-5046283 completed. 01-Oct-2015 09:08:58 Finished processing deployment result Deployment of 'develop-5' on 'Staging'

janatzend commented 8 years ago

ok, I think I found the issue. After I was searching in the wrong direction for quite a while, I was able to reproduce the issue. Please check out the new zendserver.jar resp. zendserver-1.2.2-2.jar

PhearZero commented 8 years ago

Good to go! Thanks janatzend and Cheers!

Ubuntu 14.04 -> zendserver-1.2.2.2.jar