2015-05-14 69 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 :更新以查找。