2015-05-14 70 views
0

我有一个maven项目,用我的战争更新appspot,但是当生成由Atlassian Cloud Bamboo执行时,OAuth认证提示访问令牌。mvn appengine:从竹更新需要凭据

14-May-2015 00:17:18 [INFO] Retrieving Google App Engine Java SDK from Maven 
14-May-2015 00:17:18 [INFO] Updating Google App Engine Application 
14-May-2015 00:17:18 [INFO] Running -V 1.9.20 --oauth2 update /mnt/bamboo-ebs/bamboo-agent/build-dir/[project path]-1-SNAPSHOT 
14-May-2015 00:17:21 Please open the following URL in your browser: 
14-May-2015 00:17:21  https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=XXXXXXXX.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/appengine.admin%20https://www.googleapis.com/auth/cloud-platform 

打开url我能够获得访问令牌,但我无法输入它,因此构建挂起直到取消。

我应该如何设置身份验证?

回答

0

将代理凭证添加到EBS连接的卷中,并在代理启动时将其复制到位。

  1. Configure bamboo为EBS卷连接
  2. SSH into实例,苏竹用户
  3. Download的AppEngine上SDK
  4. Run appcfg被提示进行身份验证
    1. 下,appcfg -s我-app.appspot .com版本
    2. 遵循oauth的说明,它将创建/home/bamboo/.appcfg_oauth2_tokens_java
  5. 的mkdir到/ mnt /竹EBS/AppEngine上
  6. CP /home/bamboo/.appcfg_oauth2_tokens_java到/ mnt /竹EBS/AppEngine上
  7. 编辑到/ mnt /竹EBS /斌/定制,演员.SH(见docs)添加以下
    1. CP /mnt/bamboo-ebs/appengine/.appcfg_oauth2_tokens_java /家用/竹/
    2. CHOWN竹:竹/home/bamboo/.appcfg_oauth2_tokens_java
  8. 取卷的快照和快照分配给您的竹实例配置

下一次竹子开始一个新的实例customize-extras.sh将运行和必要的凭证将在地方MVN的AppEngine :更新以查找。