“在常规位置找不到Google Cloud SDK,并且未提供任何路径."詹金斯 [英] "The Google Cloud SDK could not be found in the customary locations and no path was provided." Jenkins

查看:185
本文介绍了“在常规位置找不到Google Cloud SDK,并且未提供任何路径."詹金斯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对詹金斯(Jenkins)刚起步,但是几天来我一直在寻找答案.我在localhost:8080上运行jenkins.我已经用Java编写了一个程序,该程序使用gradle部署到Google App Engine云.现在,我想使用Jenkins在GIT中构建程序.用gradle构建程序很好.当我运行

I am very new to jenkins, but I have searched for an answer for this a couple of days now. I run jenkins on localhost:8080. I have written a program in Java which uses gradle to deploy to Google App Engine cloud. Now I wanted to use Jenkins to build my program in GIT. Building the program with gradle is fine. When I run

./gradlew appengineDeploy

./gradlew appengineDeploy

在Execute Shell中,我得到以下信息:

in Execute Shell I get following:

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

  • 出了什么问题:

任务':appengineDeploy'的执行失败.

Execution failed for task ':appengineDeploy'.

在常规位置找不到Google Cloud SDK,并且未提供任何路径.

The Google Cloud SDK could not be found in the customary locations and no path was provided.

  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

建立失败

总时间:9.571秒

构建步骤'Execute shell'将构建标记为失败 完成:失败

Build step 'Execute shell' marked build as failure Finished: FAILURE

当我在没有Jenkins的情况下在本地运行代码时,可以在以下位置找到Google Cloud SDk:

When I run the code locally, without Jenkins, The Google Cloud SDk is found under:

/Users/marioyoussef/Desktop/google-cloud-sdk

/Users/marioyoussef/Desktop/google-cloud-sdk

它运行完美,但是我不知道如何在执行./gradlew appengineDeploy时将其加载到jenkins.

And it works perfect, but I have no idea how to load it to jenkins when executing ./gradlew appengineDeploy.

推荐答案

在模块的build.gradle中添加以下内容可能会有所帮助:

Adding the following to the module's build.gradle might help:

appengine.tools.cloudSdkHome="/Users/marioyoussef/Desktop/google-cloud-sdk"

请参见 https://cloud.google.com/appengine /docs/flexible/java/gradle-reference#global_properties :

可选属性,用于配置Google Cloud SDK的位置.通常,在与 gcloud组件安装app-engine-java 一起安装时,插件会在Cloud SDK中找到该插件.

Optional property to configure the location of the Google Cloud SDK. Typically the plugin finds this in the Cloud SDK when it is installed with gcloud components install app-engine-java.

这篇关于“在常规位置找不到Google Cloud SDK,并且未提供任何路径."詹金斯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆