从Jenkins部署war文件到弹性beantalk时部署失败

时间:2017-02-20 10:48:01

标签: java amazon-web-services jenkins deployment

当我尝试使用AWSEB部署插件将我的webapp从Jenkins部署到AWS弹性beantalk时出现以下错误。

我在Root Object字段集中指定了文件路径,因此IncludesExcludes字段集中没有值。

    AWSEB Deployment Plugin Version 0.3.15
    FATAL: Deployment Failure
    java.io.IOException: Deployment Failure
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:188)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
        at hudson.model.Build$BuildExecution.build(Build.java:205)
        at hudson.model.Build$BuildExecution.doRun(Build.java:162)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
        at hudson.model.Run.execute(Run.java:1728)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:404)
    Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Root Object doesn't exist
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at hudson.remoting.LocalChannel$2.get(LocalChannel.java:77)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:66)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:184)
        ... 9 more
    Caused by: java.lang.IllegalArgumentException: Root Object doesn't exist
        at org.apache.commons.lang.Validate.isTrue(Validate.java:136)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerCommand$ValidateParameters.perform(DeployerCommand.java:124)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerChain.perform(DeployerChain.java:54)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:42)
        at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:27)
        at hudson.remoting.LocalChannel$1.call(LocalChannel.java:52)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

有关此错误的任何想法? Root Object doesn't exist

1 个答案:

答案 0 :(得分:1)

Root obect字段要求您提供要部署到beanstalk的文件或文件夹的路径。

重要的是路径应该相对于项目的根目录。

请考虑以下示例:

  • 您的项目位于目录" P"在这个文件夹里面你有2个子目录A&乙
  • 假设您在上一个构建步骤中已导航到子目录,例如A
  • 您要部署的文件存在于A / target / XYZ.war
  • 然后,Root Object字段的输入将是" A /目标/ XYZ.war" (没有引号)

注意 - 即使您当前的工作目录是A,但Root对象路径仍然必须相对于您的工作区(项目的根目录)