Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View WAS Builder on the plugin site for more information.

This plugin allows Jenkins to invoke IBM WebSphere Application Server's wsadmin as a build step.

About this plugin

This plugin allows to invoke the wsadmin command of IBM WebSphere Application Server (WAS) 6.0/6.1/7.0 as a build step. It can be used for example to deploy a freshly built application (self-promo: using the RAD Builder Plugin).

This plugin supports:

  • WAS 6.0 (versions 1.0 to 1.6 successfully tested with WAS 6.0.2.15 – should work with other 6.0.2.x versions)
  • WAS 6.1 (not yet tested)
  • WAS 7.0 (version 1.1 to 1.6 successfully tested with Administration Thin Client built from WAS 7.0.0.7 – should work with other 7.0.0.x versions)
  • WAS 8.0 (version 1.6 successfully tested with full WebSphere v8 non-ND installation – thanks Ilko Iliev for the feedback)

User guide

Before adding a WAS build step to a job, the WAS Builder plugin must be configured as follow:

  • First, one or several WAS installations must be defined in Jenkins' main configuration panel (cf. upper part of the screenshot below). These WAS installations must not necessarily correspond to some running WAS servers: The plugin simply uses their wsadmin command (the one located in the bin folder of the installed product) to connect to remote servers.
  • Once at least one installation is defined, you need to save the changes and to go back to Jenkins' main configuration panel to be able to define the servers that the jobs will use (lower part of the screenshot above).

Once at least one server is defined, it's possible to add some "IBM WebSphere Application Server 6.x/7.x" build steps to your jobs (cf. screenshot below). Most of wsadmin options can be controlled through the GUI. Take a look at the inline help (the little question marks located on the right of each field) to know more about each feature.

The Run if field doesn't correspond to a wsadmin option. It can be used to dynamically enable/disable a build step for a particular run: If Run if is defined (let's say with the STOP_SERVER value) for a build step, then the build step will be run if and only if:

  • a build variable with the same name (in our case, STOP_SERVER) is defined and has a value,
  • or (exclusive) if no build variable with the same name is defined and an environment variable with the same name (still STOP_SERVER in our example) is defined, whether it has a value or nor.

When defining a build step for WAS 6.0, be sure to refer to the inline help to know if you can use it: Some options (job ID, trace file, etc.) are available only for WAS 6.1 or greater.

Check-out this post on IBM developerWorks to get an introduction on how this plugin can be used (thanks Ilko).

Version history

Version 1.6.1 (10/20/2011)

  • Fixed JENKINS-11104: wsadmin was not working when used with sudo

Version 1.6 (08/07/2011)

  • Update for Jenkins

Version 1.5 (04/23/2010)

  • Added a new Wsadmin command field (at the WAS installation level) allowing to tweak the wsadmin.bat/wsadmin.sh command actually run, for example to prefix it with sudo.
  • The list of WAS servers is now alphabetically sorted when saving the global configuration.

Version 1.4 (04/13/2010)

  • The Run if option now allows to use boolean parameters in addition to build or environment variables.

Version 1.3 (04/13/2010)

  • Added an option which allows creating automatically, if the locks-and-latches plugin is installed, one lock per defined WAS server.

Version 1.2 (04/06/2010)

  • Added an option for allowing the wsadmin user/password at the build step level.

Version 1.1 (03/30/2010)

Version 1.0.1 (01/24/2010)

  • Bug fix: Installations defined for slave nodes were not taken into account; The plugin was always referring to the installation on the master node.

Version 1.0 (12/18/2009)

  • Initial release

48 Comments

  1. Unknown User (abrugger)

    Is it possible to know when this plugin will be available? We want to use Hudson to make some WAS deployment (WAS 6.1) and it will be useful for us.

    Antony

    1. Unknown User (rseguy)

      Hello Antony,

      The plugin seems to work fine on Windows XP, I just need to do some testing on Linux to see if the "Run if" stuff works fine (which I have a doubt). Once done, I'll release the plugin, maybe at the end of this week.
      Anyway, if you want to get it in advance, the source code is available in the SVN repository.

    2. Unknown User (rseguy)

      The plugin has been released this morning (18/12/2009), it should appear soon in Hudson's plugins center.

  2. Unknown User (paul.cleary@oracle.com)

    I have this plugin installed on the latest hudson release on linux.

    I have Websphere 6.1.0.21 installed locally as well.

    I would like to deploy to a remote websphere instance also running Websphere 6.1.0.21.

    I setup a WAS installation and WAS server, but I don't see where I configure the step in my Hudson Job. It is a Maven 2 job, can I only add the step in a freestyle project?

    Now, the tough question, I need to auto deploy to a remote server, any details on what should be in the Websphere step in my job to do that? I guess I need to Update the application, save everything, and restart the application server.

    Any help is greatly appreciated.

    Regards,
    Paul

    1. Unknown User (rseguy)

      You're right, the plugin is currently restricted to freestyle projects as I don't have M2 projects to ensure it would work fine with it (I prefer restricting functionalities rather than providing buggy ones).
      If you wish, I can pack & send an "unlimited" version of the plugin for you to test so that I can officialy expand the scope of the plugin.

      For your last question, I use to do the following to deploy apps on a remote WAS server:

      1. I remotly invoke WAS's EARExpander.sh/.bat command to backup the currently deployed app
      2. The node is stopped if the user wants it (this is the purpose of the Run if field)
      3. The application is undeployed
      4. The updated app is then deployed
      5. The node is started (if the user wants it)
      6. The updated app is started

      Stopping/starting the node makes sense only the first time JAAS auth data are created or when the value of the password changes.
      Additional point: I always create two jobs to build apps: The first builds and unit-tests the app, the second one does the deployment on WAS.

      Regards,
      Romain

      1. Unknown User (vrspraveen.atluri@gmail.com)

        Hello Romain,

        1) Are you using Power Shell plugin to invoke remote Websphere Installation Scripts?

        2) I am trying to build and deploy maven project. Can you provide me the unlimited version of the plugin?

        Regards,

        Praveen Atluri

        1. Unknown User (rseguy)

          The plugin uses wsadmin.bat/wsadmin.sh to administer WAS and, normally, version 1.0.1 of the plugin is no more restricted to free style jobs.
          To use it directly from a Maven job, you need to install the M2 Extra Steps Plugin. But I would recommend splitting it to another downstream job since, IMO, build and deployment are clearly two different things.

  3. Unknown User (zzstore)

    Is there any way to run the wsadmin.sh script using sudo on unix?

    1. Unknown User (rseguy)

      If you describe exactly what you expect, I may integrate it.

      1. Unknown User (zzstore)

        The plugin runs the following command:
        /usr/IBM/WAS61/AppServer/bin/wsadmin.sh -conntype SOAP -host hostname -port 61000 -user.....

        The unix permissions of the WAS installation at our place are set such that I cannot run the wsadmin script without using sudo.
        Is there anyway you could run it as:
        /usr/sudo/sudo /usr/IBM/WAS61/AppServer/bin/wsadmin.sh -conntype SOAP -host ...

        1. Unknown User (rseguy)

          What I'm going to do is adding a new field in the global config page to be able to override the wsadmin command for each WAS installation.

        2. Unknown User (rseguy)

          I've implemented your enhancement request, it's part of release 1.5.

          1. Unknown User (zzstore)

            Thanks, When can I expect release 1.5 to be available to download?

            1. Unknown User (rseguy)

              I've released it last Friday, the SVN tag is in place (https://hudson.dev.java.net/svn/hudson/tags/was-builder-1.5/), the announcement too, so it might be the update center which is a little bit late.

          2. Unknown User (helenov)

            Hi,

            I'm trying to use this "Wsadmin Command" feature, but it is not working. It seems Jenkins is treating the field content as a single command.

            This is the Console Output I'm receiving (note the quotation marks around what came from the "Wsadmin Command" field):Using user admin defined at the server level
            $ "/usr/bin/sudo /home/was/IBM/WebSphere/AppServer01/bin/wsadmin.sh" -conntype SOAP -host zefiro.cit -port 8880 -user admin -password ******** -lang jython -f "/var/lib/jenkins/jobs/AVD ZEFIRO/workspace/newDeploy.py" "AVD ZEFIRO" zefiro Vendas
            FATAL: Wsadmin execution failed
            Build step 'IBM WebSphere Application Server 6.x/7.x' marked build as failure
            Checking console output
            Finished: FAILURE

            I'm using Jenkins 1.430 and WAS Builder Plugin 1.6.

            Can any one help me?

            Thanks in advance.

            1. Unknown User (rseguy)

              Is there more information displayed in Jenkins' log (accessible from the main configuration screen)?

              1. Unknown User (helenov)

                I'm afraid it doesn't say much thing...

                Sep 19, 2011 4:18:01 PM hudson.model.Run runINFO: AVD ZEFIRO #12 main build action completed: FAILURE

                and that's all.... :-(

              2. Unknown User (helenov)

                My only clue is still the quotation marks around de "sudo wsadmin" pair... :-/

                1. Unknown User (rseguy)

                  Can you create an issue in JIRA? I'll fix that, I think you're right regarding the quotes. I'll remove them.

                  1. Unknown User (helenov)

                    Issues created (https://issues.jenkins-ci.org/browse/JENKINS-11104).  

                    I'm looking forward to a solution! Thank you very much!

                    1. Unknown User (rseguy)

                      I've just attached a fix to the JIRA issue. Can you please give a try with it? If it works for you (on my side it works), I'll release 1.6.1.

  4. Unknown User (kirthish kulkarni)

    Hi ,

    My requirement is to deploy the application in Websphere Cluster environment , so following are the steps i followed in ant build file which i call in Hudson job 

    1. checkout code from CVS

    2. run a CMD file for building the application ear file , using wesphere python script .

    3. finally , restarting the manager and nodes

     which seems to be a hectic job

    how can i configure the WEBSPHERE - Cluster setup into Hudson using WAS-Plugin ,  and add pre-setup and post-setup  steps which will run

    my python script  and publish the deployment details.

    Thanks & Regards ,

    Kirthish Kulkarni.

  5. Unknown User (jvorpahl)

    Romain,

    Thanks for building the plug-in. It works great but I'm having a small issue. When a deployment fails, it still says the build is successful. Is there something I can do to pass the value back to Hudson? When I run wsadmin outside of the plugin see that the %ERRORLEVEL% parameter is > 0 (105 to exact) when it exits on error. But the plugin must be preventing Hudson from recognizing the error code of the wsadmin.bat program. I could use the windows batch command build option but the plugin makes everything much easier to setup and read and also the plugin hides the password to the server. That is a huge plus.

    Thanks in advance for the help.

  6. Unknown User (ilkomiliev@gmail.com)

    I wrote short post about my experience setting up CI infrastructure based on Jenkins, using this plugin to deploy remotely between different WAS8 environments. The post can be found here

  7. Unknown User (atenfe)

    Hi,

    We have a doubt as WAS Think Client integration with WAS Server. Our system have a machine with jenkins (with WAS builder plugin) and a lot of remote WAS. The WAS Think client versión is 7.0.0.12 (instaled in Jenkins machine) and we want deploy aplications in WAS servers with other versions like 7.0.0.13, 7.0.0.14. ¿Is this a problem? ¿Have one experience about it?

    And the second, in all the WAS we have a security enabled, ¿Could be a problem?

    Thanks a lot,

    AtEnfe

    1. Unknown User (rseguy)

      The WAS Think client versión is 7.0.0.12 (instaled in Jenkins machine) and we want deploy aplications in WAS servers with other versions like 7.0.0.13, 7.0.0.14. ¿Is this a problem?

      ==> No, it's not a problem, it will work fine.

      in all the WAS we have a security enabled, ¿Could be a problem?

      ==> No, the plugin handles security nicely as long as signers have been added to the trust store.

  8. Unknown User (walterk82)

    I have a situation where I need the username and password defined at the server level available to use inside of a wsadmin script.  This will be used to configure LDAP security.  Is there a way that these can be externalized so they are available inside of a admin script and hopefully keep them secure?

    1. Unknown User (rseguy)

      It's possible: You can use variables within the user and password fields at the build step level.

  9. Unknown User (auro)

    Is it possible to pass a variable as "Was Server" instead of selecting it from a combo at the build step level? This is useful in case of parametrized builds.

    If it is not possible, could I ask for that feature?

    1. Unknown User (rseguy)

      In fact this feature has already been implemented in the next version of the plugin. There's a $SERVER entry in the list, which picks the value from the SERVER variable. I'll tell about your comment to the new maintainer of the plugin, Daniel.

      1. Unknown User (auro)

        Great! Thank you. Auro

  10. Unknown User (thrar)

    Is it possible to use a WebSphere installation that has spaces in the path? Mine is installed under C:\Program Files and I want to invoke a python script via wsadmin.bat.

    Here is the Jenkins console output:

    Using user admin defined at the server level
    $ C:\Program Files\IBM\WebSphere\AppServer\bin\wsadmin.bat -conntype SOAP -host {IP address here} -port 9044 -user admin -password ******** -lang jython -f "{path to the script}\install_to_websphere.py"
    'C:\Program' is not recognized as an internal or external command,
    operable program or batch file.
    Build step 'IBM WebSphere Application Server 6.x/7.x' marked build as failure
    

    I tried putting quotation marks, either single or double, around the path in the main Jenkins configuration. Doesn't work, the configuration complains it's not a folder and the build step won't even start. Is there any other way to make it work despite the spaces?

    1. Unknown User (rseguy)

      I suggest you user a DOS-style notation, like C:\Progra~1 rather than C:\Program Files. As this, there won't be any spaces, and it will work.

      1. Unknown User (thrar)

        Thanks for the quick answer, that works. (smile)

        Another question came up though:

        In our environment, Jenkins and WebSphere are running on the same machine and wsadmin through SOAP etc. isn't set up. Running from the command line, I can simply not specify the -conntype, -host and -port options or use -conntype NONE. The plugin apparently doesn't allow that, I have to specify a connection type and can only choose SOAP, RMI, or JSR160RMI. Can I get NONE in there somehow?

        1. Unknown User (rseguy)

          Yep, this is something which can be done. I just don't know why I didn't put it in place.
          Would you go ahead and develop the corresponding patch? That's something easy to do.

          1. Unknown User (thrar)

            I changed the build to invoke wsadmin via the command line instead. Works, I just need to remember to update it separately if something about the WAS configuration changes later. I haven't worked on any Jenkins plugins before, so I'd rather not spend the time I need to configure my IDE etc. to make the change, even if in the code it's just a small issue.

  11. Unknown User (walterk82)

    Is there a timeline of when version 2.0 will be released?  I am really interested in the Message Broker support.

  12. Unknown User (troytown00)

    How do you get this to work??

    My WAS is located on my remote windows server and Jenkins is on Linux.  I don't understand the part were it says the "Installation directory"  the wsadmin file would be located on my remote WAS under the /bin directory... so what exactly would i put in "Installation directory" field ??   I just want to run a jacl script that needs to execute the "wsadmin" command that is located on the windows server that will replace my .ear file after my build deployment is complete. Thank you for your help.

    1. Unknown User (wanhaoran)

      I have a similar problem where Jenkins is on one Red Hat box while WebSphere 8 is on another Red Hat box. How should I config this thing? Or I have to install another WebSphere 8 instance on the first Red Hat?

      1. Unknown User (walterk82)

        To do this, you must either install WAS on the Jenkins Slave or use the AdminThin client on the Jenkins Slave.

        See: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.base.doc/info/aes/ae/txml_adminclient.html

  13. Unknown User (ioanacreanga)

    Hello.

    Can you put in some lines about how to make it work with administration thin client?

    We are trying to achieve the following:

    We need to automatically deploy one ear from jenkins to a remote WAS installation but we cannot afford ( well, people won`t let us) install a full instance of WAS.

    After we have installed the plugin, we need to create a WAS instance on jenkins in order to use WAS builder plugin, but we do not have one.

    I can see that you have support for administration thin clients but I am not sure how the path should look like so it can be recognised as a WAS instance.

    Can you help me with that?

    Also, the user name and password which needs to be provided on the plugin configuration panel should it have a deployer role on the remote WAS instance? Or should it be an user that connects locally to the administration thin client?

    Very much appreciated.

    Thanks,

    Ioana.

    1. Unknown User (walterk82)

      I have attached a sample script to this wiki page that I have used to launch the thin client.   The IBM doc is fairly detailed on the requirements for this.  You need to establish the trust.p12 and configure the soap.client.properties to make the connections.

      1. Unknown User (ioanacreanga)

        Hello. 

        I can see that you attached the thin client bat file. It`s very much appreciated. I did manage to setup the plugin and query some stuff remotely on the WAS instance. What I wasn`t able to do though was to actually deploy an ear, which was in fact my target.The thin client is on a Windows machine while WAS is installed on Aix and I get this error while using AdminApp.install: 

        ADMA0043E:
        C:\Temp\app23320.ear does not exist for installation.

        I assume that it tries to transfer the ear file to the remote machine and it is looking for the ear in a temporary folder on a windows machine, but the remote machine is  an AIX. I`ve googled around, the only information I could find is that this might happen if I have WAS 5.1, that does not support the transfer,which is not the case or the 2 machines,the one with the thin client and the remote one run on different OS, which is my case but seems ridiculous to have that constraint. 

        Do you happen to know anything about it? I would really appreciate it. I know there are other ways of doing it, but some other methods require wasadmin password or having a root user on the remote machine, which we`re not allowed to have. 

        Thanks a lot for answering to my comment. 

        Cheers, 

        Ioana C.

  14. Unknown User (ioanacreanga)

    Hello. 

    I can see that you attached the thin client bat file. It`s very much appreciated. I did manage to setup the plugin and query some stuff remotely on the WAS instance. What I wasn`t able to do though was to actually deploy an ear, which was in fact my target.The thin client is on a Windows machine while WAS is installed on Aix and I get this error while using AdminApp.install: 

    ADMA0043E:
    C:\Temp\app23320.ear does not exist for installation.

    I assume that it tries to transfer the ear file to the remote machine and it is looking for the ear in a temporary folder on a windows machine, but the remote machine is  an AIX. I`ve googled around, the only information I could find is that this might happen if I have WAS 5.1, that does not support the transfer,which is not the case or the 2 machines,the one with the thin client and the remote one run on different OS, which is my case but seems ridiculous to have that constraint. 

    Do you happen to know anything about it? I would really appreciate it. I know there are other ways of doing it, but some other methods require wasadmin password or having a root user on the remote machine, which we`re not allowed to have. 

    Thanks a lot for answering to my comment. 

    Cheers, 

    Ioana C.

    1. Unknown User (walterk82)

      Your Jython script would specify the path of the EAR to deploy and that should be local to the Thin client because as you have said the Thin client does a transfer to the remote host.

      1. Unknown User (ioanacreanga)

        It does specify the path to the EAR locally. But when it tries to make the transfer, the ear is saved in C:/temp and it gets immediately deleted. And then I get the ear does not exist in C:/temp for installation error. 

        Pretty much like in this thread:

        https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000002500699

        1. Unknown User (walterk82)

          Hmm, I'm not sure, have you enable wsadmin tracing before the deployment command to analyze the failure point?  AdminControl.trace('*=all=enabled')

  15. Unknown User (fieschith)

    Hello,

    Is there any prevision regarding the 2.0 plugin release?

    Thank you,

    Thomas