从 Hudson/Jenkins 部署应用程序引擎应用程序时处理身份验证的最佳方法是什么?

发布于 2024-12-26 02:46:37 字数 251 浏览 1 评论 0原文

我可以使用 appcfg.sh 从命令行部署我的 App Engine 项目,没有任何问题。我想让它在 Jenkins 中工作,但问题是部署实用程序提示输入我的 Google 密码。我可以使用 --email 参数传递电子邮件,但无法传递密码(请不要建议使用 --passin b/c 这不是它的用途)。

我能想到的最好的情况是,当有人运行 Jenkins 作业时,它会要求输入用户名/密码,并使用它来运行部署。

但此时我会采取任何方法让它发挥作用。谢谢。

I'm able to deploy my App Engine project from the command line using appcfg.sh without a problem. I'd like to get this to work in Jenkins but the problem is the deploy utility prompts for my Google password. I can pass in the email using the --email parameter but there's no way to pass in the password (please don't suggest using --passin b/c that's not what it's for).

The best case senario I can think of is that when someone runs the Jenkins job it asks for the username/password then and runs the deploy using that.

But I'd settle for any way to get it working at this point. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

¢好甜 2025-01-02 02:46:37

如果您不介意您的密码以明文形式显示,这就是我在构建 XML 上使用的内容,以从 Jenkins 自动部署我的应用程序:

<target name="update" 
        depends="enhance" 
        description="Uploads the application, including indexes">

        <java classname="com.google.appengine.tools.admin.AppCfg" 
              inputstring="<YOUR_PASSWORD>" 
              classpath="${appengine.sdk}\lib\appengine-tools-api.jar">

              <classpath>
                  <fileset dir="${war.dir}/WEB-INF/lib" includes="**/*.jar" />
              </classpath>
              <arg value="--email=<YOUR_EMAIL>" />
              <arg value="--passin" />
              <arg value="update" />
              <arg value="war" />
        </java>
</target>

其中 appengine.sdk 指向您的 GAE 文件夹,即

If you don't mind your password to be visible in plaintext, this is what I use on my build XML to auto-deploy my app from Jenkins:

<target name="update" 
        depends="enhance" 
        description="Uploads the application, including indexes">

        <java classname="com.google.appengine.tools.admin.AppCfg" 
              inputstring="<YOUR_PASSWORD>" 
              classpath="${appengine.sdk}\lib\appengine-tools-api.jar">

              <classpath>
                  <fileset dir="${war.dir}/WEB-INF/lib" includes="**/*.jar" />
              </classpath>
              <arg value="--email=<YOUR_EMAIL>" />
              <arg value="--passin" />
              <arg value="update" />
              <arg value="war" />
        </java>
</target>

Where appengine.sdk points to your GAE folder, i.e.
<property name="appengine.sdk" location="D:\libs\appengine-java-sdk-1.5.1"/>.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文