0
votes

I am using Jenkins version 1.644 and trying to deploy a web application to Websphere 8.5 application server. Jenkins job completed successfully and application is visible through admin console. After the first install, i manually configured Three application configurations namely, 1. Virtual Host 2. Context Root and 3 Modules after these setup application comes up fine.

Now when i run the Jenkins Job again (option used is Install/Update application), it overrides all the configurations.

Please Let me know how to keep the configurations after each build from Jenkins.

Websphere Plugin Configuration

2
where do you want to keep the configuration ? if you are deploying same application with another configuration it will override for sureDevesh
Cant we preserve these configurations during every build job update?Karthik
can you provide the steps or url where I can see the steps you are followingDevesh
i have configured a job in jenkins, this will use websphere-deploy plugin (for configurations, refer to the link above) and install the app to my server. After the first install, i got and setup the three configuratons i mentioned above using WAS Admin console.Karthik

2 Answers

0
votes

You can create a build deploy job which will call wsadmin tool and there you can pass parameter in key value pairs

Here is an article which talks about how to build job with parameterized configuration.

http://www.touchdownconsulting.nl/2011/03/building-and-deploying-websphere-applications-with-jenkins-ci/

I have not tried this but looks like it suits your requirement.

Hope this helps!

0
votes

Current Jenkins Websphere deploy plugin (1.3.4) version does not allow to pass 1. Virtual Host 2. Context Root and 3. Modules

I created a Jython script using AdminApp WAS Utility and updated these parameters

AdminApp.edit("appname", ['-MapWebModToVH', [["appname", "appname.war,WEB-INF/web.xml", "api_host"]]])

AdminApp.edit("appname", ['-CtxRootForWebMod', [["appname", "appname.war,WEB-INF/web.xml", "/appname"]]])

AdminApp.edit("appname",['-MapModulesToServers', [["appname","appname.war,WEB-INF/web.xml","WebSphere:cell=appcell01,node=node12v,server=web2+WebSphere:cell=Cell01,node=node11v,server=web1+WebSphere:cell=Cell01,cluster=api-cluster"]]])

AdminConfig.save()

Used Jenkins Remote SSH Plugin to invoke this script.