小编典典

为什么Jenkins作业在CloudBees上失败并显示“ Server.InternalError-不支持的部署类型:zip”?

jenkins

我正在尝试将PlayFramework应用程序部署到CloudBees,并且在本地时可以正常运行play run。之后git push到一个Git仓库,它是自动dist,然后将生成的压缩文件部署,不幸的是失败。

这是此问题的日志:

[info] Packaging /scratch/jenkins/workspace/hello-play-tutorial/target/scala-2.11/hello-play-tutorial_2.11-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] 
[info] Your package is ready in /scratch/jenkins/workspace/hello-play-tutorial/target/universal/hello-play-tutorial-1.0-SNAPSHOT.zip
[info] 
[success] Total time: 5 s, completed Sep 8, 2014 8:07:39 AM
[cloudbees-deployer] Deploying as (jenkins) to the xxx account
[cloudbees-deployer] Deploying hello-play-tutorial
[cloudbees-deployer]   Resolved from workspace as /scratch/jenkins/workspace/hello-play-tutorial/target/universal/hello-play-tutorial-1.0-SNAPSHOT.zip
[cloudbees-deployer] Deploying via API server at https://api.cloudbees.com/api
[cloudbees-deployer] 0 MB
[cloudbees-deployer] 1 MB
[cloudbees-deployer] 3 MB
[cloudbees-deployer] 4 MB
[cloudbees-deployer] 6 MB
[cloudbees-deployer] 7 MB
[cloudbees-deployer] 9 MB
[cloudbees-deployer] 10 MB
[cloudbees-deployer] 12 MB
[cloudbees-deployer] 13 MB
[cloudbees-deployer] 15 MB
[cloudbees-deployer] 16 MB
[cloudbees-deployer] 18 MB
[cloudbees-deployer] 19 MB
[cloudbees-deployer] 21 MB
[cloudbees-deployer] 22 MB
[cloudbees-deployer] 24 MB
[cloudbees-deployer] 25 MB
[cloudbees-deployer] 27 MB
[cloudbees-deployer] 28 MB
com.cloudbees.plugins.deployer.exceptions.DeployException: remote file operation failed: /scratch/jenkins/workspace/hello-play-tutorial/target/universal/hello-play-tutorial-1.0-SNAPSHOT.zip at hudson.remoting.Channel@5c358135:24b747e7
    at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:185)
    at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:119)
    at com.cloudbees.plugins.deployer.DeployPublisher.perform(DeployPublisher.java:122)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:825)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:797)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:746)
    at hudson.model.Run.execute(Run.java:1709)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:232)
Caused by: java.io.IOException: remote file operation failed: /scratch/jenkins/workspace/hello-play-tutorial/target/universal/hello-play-tutorial-1.0-SNAPSHOT.zip at hudson.remoting.Channel@5c358135:24b747e7
    at hudson.FilePath.act(FilePath.java:910)
    at hudson.FilePath.act(FilePath.java:887)
    at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:179)
    ... 11 more
Caused by: hudson.remoting.ProxyException: hudson.util.IOException2: Server.InternalError - Deployment type not supported: zip
    at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:382)
    at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:289)
    at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:271)
    at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:259)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2462)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:328)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: hudson.remoting.ProxyException: com.cloudbees.api.BeesClientException: Server.InternalError - Deployment type not supported: zip
    at com.cloudbees.api.BeesClient.readResponse(BeesClient.java:1805)
    at com.cloudbees.api.BeesClient.applicationDeployArchive(BeesClient.java:732)
    at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:374)
    ... 12 more
Build step 'Deploy applications' marked build as failure
Finished: FAILURE

以前曾问过这个问题,但尚无有效答案- 在使用jenkins的cloudbees中构建playframework应用程序时出错:不支持部署类型:zip。


阅读 261

收藏
2020-07-25

共1个答案

小编典典

您可能必须对应用程序进行参数设置,因为到目前为止.war,由于未在任何地方指定部署类型,因此它认为您正在尝试为Tomcat部署A。

为此,只需输入以下内容,并安装CloudBees SDK:

bees app:update ACCOUNT/APPLICATION -t play2

如果这不起作用,则可以尝试使用旧的方式:

bees config:set -a ACCOUNT/APPLICATION containerType=play2
2020-07-25