Deployment (gcloud.preview.app.deploy)错误响应:[400]“;环境";此部署不支持此设置

Deployment (gcloud.preview.app.deploy)错误响应:[400]“;环境";此部署不支持此设置,deployment,jenkins,gcloud,google-cloud-sdk,Deployment,Jenkins,Gcloud,Google Cloud Sdk,我尝试了这些教程,并进行了mvn gcloud:deploy,但收到以下错误消息: [dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh + mvn gcloud:deploy [INFO] Scanning for projects... [INFO]

我尝试了这些教程,并进行了mvn gcloud:deploy,但收到以下错误消息:

    [dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh
    + mvn gcloud:deploy
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jenkins-test-java 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] >>> gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) > package @ jenkins-test-java >>>
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jenkins-test-java ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ jenkins-test-java ---
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jenkins-test-java ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ jenkins-test-java ---
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ jenkins-test-java ---
    [INFO] No tests to run.
    [INFO] 
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jenkins-test-java ---
    [WARNING] JAR will be empty - no content was marked for inclusion!
    [INFO] 
    [INFO] <<< gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) < package @ jenkins-test-java <<<
    [INFO] 
    [INFO] --- gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) @ jenkins-test-java ---
    [INFO] Running gcloud app deploy...
    [INFO] Running python -S /google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=straw-hat-pirates-dev preview app deploy /var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml
    [INFO] WARNING: Soon, deployments will set the deployed version to receive all traffic by
    [INFO] default.
    [INFO] 
    [INFO] To keep the current behavior (where new deployments do not receive any traffic),
    [INFO] use the `--no-promote` flag or run the following command:
    [INFO] 
    [INFO]   $ gcloud config set app/promote_by_default false
    [INFO] 
    [INFO] To adopt the new behavior early, use the `--promote` flag or run the following
    [INFO] command:
    [INFO] 
    [INFO]   $ gcloud config set app/promote_by_default true
    [INFO] 
    [INFO] Either passing one of the new flags or setting one of these properties will
    [INFO] silence this message.
    [INFO] 
    [INFO] You are about to deploy the following modules:
    [INFO]  - straw-hat-pirates-dev/default (from [/var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml])
    [INFO]      Deployed URL: [https://20151223t054356-dot-straw-hat-pirates-dev.appspot.com]
    [INFO]      (add --promote if you also want to make this module available from
    [INFO]      [https://straw-hat-pirates-dev.appspot.com])
    [INFO] 
    [INFO] Beginning deployment...
    [INFO] Verifying that Managed VMs are enabled and ready.
    [INFO] 
    [INFO] Provisioning remote build service.
    [INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
    [INFO] Building and pushing image for module [default]
    [INFO] ----------------------------- DOCKER BUILD OUTPUT ------------------------------
    [INFO] Step 0 : FROM gcr.io/google_appengine/openjdk8
    [INFO] ---> 3c058a018ce1
    [INFO] Step 1 : ADD jenkins-test-java-1.0-SNAPSHOT.jar /app/
    [INFO] ---> 938437aaa1a1
    [INFO] Removing intermediate container 4106bc3645ca
    [INFO] Step 2 : ENTRYPOINT java -jar /app/jenkins-test-java-1.0-SNAPSHOT.jar
    [INFO] ---> Running in f187a76322dd
    [INFO] ---> 4600e0f4d83a
    [INFO] Removing intermediate container f187a76322dd
    [INFO] Successfully built 4600e0f4d83a
    [INFO] --------------------------------------------------------------------------------
    [INFO] 
    [INFO] Updating module [default]...
    [INFO] Updating module [default].../
    [INFO] Updating module [default]...failed.
    [INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
    [INFO] Deleted [https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
    [ERROR] Error: gcloud app command with exit code : 1
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:03 min
    [INFO] Finished at: 2015-12-23T05:45:57+00:00
    [INFO] Final Memory: 11M/56M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 1 -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE
[dev-jenkins-test-1]$/bin/sh-xe/tmp/hudson43106311253025446569.sh
+mvn gcloud:部署
[信息]正在扫描项目。。。
[信息]
[信息]------------------------------------------------------------------------
[信息]构建jenkins测试java 1.0-SNAPSHOT
[信息]------------------------------------------------------------------------
[信息]
[信息]>>>gcloud maven插件:2.0.9.88.v20151125:deploy(默认cli)>package@jenkins test java>>>
[信息]
[信息]---maven资源插件:2.6:resources(默认资源)@jenkins test java---
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
[信息]
[信息]---maven编译器插件:2.5.1:编译(默认编译)@jenkins test java---
[信息]没有要编译的源
[信息]
[信息]---maven资源插件:2.6:testResources(默认testResources)@jenkins test java---
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
[信息]
[信息]---maven编译器插件:2.5.1:testCompile(默认testCompile)@jenkins test java---
[信息]没有要编译的源
[信息]
[信息]---maven surefire插件:2.12.4:test(默认测试)@jenkins-test-java---
[信息]没有要运行的测试。
[信息]
[信息]---maven jar插件:2.4:jar(默认jar)@jenkins test java---
[警告]JAR将为空-未标记要包含的内容!
[信息]
[信息]4600e0f4d83a
[信息]拆卸中间容器f187a76322dd
[信息]已成功构建4600e0f4d83a
[信息]--------------------------------------------------------------------------------
[信息]
[信息]正在更新模块[默认值]。。。
[信息]正在更新模块[默认值]/
[信息]更新模块[默认值]…失败。
[信息]错误:(gcloud.preview.app.deploy)错误响应:[400]“环境”设置不支持此部署。
[信息]已删除[https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
[错误]错误:gcloud app命令,退出代码:1
[信息]------------------------------------------------------------------------
[信息]生成失败
[信息]------------------------------------------------------------------------
[信息]总时间:02:03分钟
[信息]完成时间:2015-12-23T05:45:57+00:00
[信息]最终内存:11M/56M
[信息]------------------------------------------------------------------------
[错误]无法在project jenkins test java上执行goal com.google.appengine:gcloud maven插件:2.0.9.88.v20151125:deploy(默认cli):错误:gcloud应用程序命令退出代码为:1->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完整调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
生成步骤“执行shell”将生成标记为失败
完成:失败
我猜:
我的环境配置似乎有问题
我仍然无法解决此问题。
谢谢你的帮助。:)
我想出来了

我敢打赌你的maven模块没有使用
war

如果您的模块设置为jar(默认),那么它将尝试作为标准java应用程序部署,您将在其中启动自己的服务器。因为您想要一个运行appengine的托管vm,所以您需要将其打包为war,然后插件将处理其余部分


干杯。

我也遇到了这个问题。Ping,如果你能弄明白的话。