Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24275

The deploy plugin does not support build parameters

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      Seems that the Deploy plugin does not resolve build parameters. If I configure my job with a build parameter and use it within Deploy plugin configuration (see the attached screenshot), it does not get properly replaced by the value and causes an exception to be raised during the execution phase:

      Deploying /var/lib/jenkins/jobs/myJob/workspace/myapp.war to container GlassFish 3.x Remote
      ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
      java.lang.IllegalStateException: error submitting remote command
      	at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:170)
      	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:436)
      	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:187)
      	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
      	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
      	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
      	at hudson.FilePath.act(FilePath.java:909)
      	at hudson.FilePath.act(FilePath.java:882)
      	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
      	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
      	at hudson.model.Run.execute(Run.java:1628)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      Caused by: java.lang.RuntimeException: error submitting remote command
      	at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:725)
      	at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683)
      	at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168)
      	... 18 more
      Caused by: java.lang.RuntimeException: org.glassfish.api.admin.CommandException: No remote server named ${DEPLOY_HOST}. Is that the correct host name?
      	at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)
      	at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694)
      	... 20 more
      

      Due this lack of functionally plugin can't be used in combination with other jobs, where it should be used dynamically (e.g. making deployment to multiple machines in a loop).

      Regards,
      Laimonas

        Attachments

          Activity

          Hide
          laimoncijus Laimonas S added a comment -

          Created a pull request with possible solution to the described problem: https://github.com/jenkinsci/deploy-plugin/pull/16

          Show
          laimoncijus Laimonas S added a comment - Created a pull request with possible solution to the described problem: https://github.com/jenkinsci/deploy-plugin/pull/16
          Hide
          jansohn Robin Jansohn added a comment -

          Is this still an issue with the latest version 1.13?

          Show
          jansohn Robin Jansohn added a comment - Is this still an issue with the latest version 1.13?

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            laimoncijus Laimonas S
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: