on 2016 Dec 11 8:01 PM
I am using Hybris 6.2 and want to automate the build and deploy process using Jenkins. I referred to the article at https://wiki.hybris.com/pages/viewpage.action?spaceKey=pe&title=Introduction+to+Setting+Up+Continuou... however, I have a doubt. Here in the Build and Initialize section of the write-up, the ant task to initialize hybris data is being invoked. My doubt is that if that step will be performed, then the entire hybris stock will come back to the initial state. The information of the stock that should be decreased (many purchases would have happened on the site) will be lost and the initial stock values will replace them. Why do we want to reset everything? Pls correct my understanding if this is not how it is
Request clarification before answering.
I have been able to create the build succesfully by checking in the custom and config directories alone. In my jenkins build job, I write a batch command that replaces the existing custom and config, with the latest versions from SVN repo (I do a checkout to temp location in order to do this).
Then I invoke the Ant command clean all updatesystem.
With this, the build gets created successfully, however, i need to start the server manually from command prompt.
Now in order to automate the server sts well:
If I include that as a third build step after invoking ant targets, then the jenkins build job will keep going on and never show a status of 'success'
If I keep hybris server started first time (in a command window) and then execute my build job, then the job fails with below message, as it is unable to copy the files:
D:\abc_b2c>MOVE D:\abc_b2c\trunk\custom D:\abc_b2c\hybris\bin. Access is denied D:\abc_b2c>MOVE D:\abc_b2c\trunk\config D:\abc_b2c\hybris. Access is denied. D:\abc_b2c>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE
In what way is it possible to build as well as start the server through Jenkins or is it possible to deploy the hybris changes in an already running hybris server just as how we would deploy web app .war files in an already running application server instance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all, "Build and Initialize" is not suited for continuous delivery to a live Production environment. Use ant updatesystem -DtypeSystemOnly=true there.
For test environments, reinitialization is a good strategy to ensure that the test results are reliable and not perturbed by accumulation of stale data that would have been left off by previous tests, potentially a long time ago.
You may not want to reinitialize daily, especially if you have tests that must span multiple days, or if you don't have a reliable and automated way to recreate your test data. In this case, the nightly job could simply run an ant updatesystem -DtypeSystemOnly=true. Create an additional job (or add an option to the nightly job) to reinitialize the test environment on demand and thus clean stale data.
Finally note that reinitialization with ant initialize makes sense for a brand new implementation (no currently live site) but is not best suited for migration projects where data already exists. In this scenario, testing against an initialized database does not guarantee that the same results would be obtained against the production data, and a better approach is to do the following instead, as part of the "Build and Initialize" job:
- restore a "cleaned" version of the production database in the test environment
- migrate with ant updatesystem (with possibly some options via -DconfigFile=...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.