4 Replies Latest reply on Mar 23, 2011 4:07 PM by peterj

    Remote deploy to jboss-5.1.0.GA-jdk6 (Hudson/Jenkins Plugin?)

    arandall

      Hi,

       

      I have been looking for a way to remote deploy to my jboss-5.1.0.GA-jdk6 instance from Jenkins and after countless searching I have decided to post here as I can't find any suitable information that enables me to achive my goal. I hope this is the right place.

       

      From my understanding JMX can be used to upload/deploy a .war file to JBoss AS 5.1. My final goal is to deploy after building my code using Jenkins. I first looked at the Deploy plugin of Jenkins but that didn't appear to work with JBoss 5.1 so I was wondering if there were any other alternatives?

       

      Can someone point me in the right direction to remote deploy my Jenkins builds to JBoss AS 5.1?

        • 1. Remote deploy to jboss-5.1.0.GA-jdk6 (Hudson/Jenkins Plugin?)
          alesj
          Can someone point me in the right direction to remote deploy my Jenkins builds to JBoss AS 5.1?

          You have these options:

          * see how we do it in Arquilllian (http://www.jboss.org/arquillian/)

          * see how we do it in AS' testsuite via legacy MainDeployer::deploy(URL)

          • 2. Remote deploy to jboss-5.1.0.GA-jdk6 (Hudson/Jenkins Plugin?)
            peterj

            Some addtional information about your setup would help also. Like where the built WAR file is located, whether that is on the same system as JBoss AS, and whther the JBoss AS is a Jenkins slave machine. If the WAR is in a Maven repository (such as Nexus or Artifactory) and your JBoss AS system is a Jenkins build slave, then a simple Ant build script that extracts the WAR from the repository and copies it to the deploy directory would work. And there are probably 1000 variations to this theme, with various different complexities.

            • 3. Remote deploy to jboss-5.1.0.GA-jdk6 (Hudson/Jenkins Plugin?)
              arandall

              The WAR file is located on the same machine that is running Jenkins and is built from the source using an Ant script. I would like to deploy this file onto JBoss AS that is running on another physical host.

               

              I haven't configured the JBoss AS system as a Jenkins slave but that may be the simplest solution.

              • 4. Remote deploy to jboss-5.1.0.GA-jdk6 (Hudson/Jenkins Plugin?)
                peterj

                Just a hint - no matter what mechanism you use (Hudson build script extracting from Nexus, FTP, network file copy, scp, etc.) make sure that your script does not directory place the WAR in the deploy directory. Instead, place the WAR in a separate temporary directory on the same partion on which JBoss AS is installed, and then move the WAR to the deploy directory. Doing it this way will avoid the possible zip file error that can result if JBoss AS tryies to deploy the WAR before it has been finished copying (and across-the-netwrok copies are always way too slow).