CloudBees Jenkins for Google App Engine
はじめに
「CloudBees Jenkins for Google App Engine」は、CloudBees が提供するサービスで、Jenkins から Google App Engine へのデプロイができるらしいです。(まだそこまでは未確認)
今回、まずは Git リポジトリ機能のみ使えるようにしてみました。
Git リポジトリの作成
Google アカウントでサインイン
- 「CloudBees Jenkins for Google App Engine」にアクセス、「Sign in with Google」ボタンを押下し、Google のアカウントでサインイン
リポジトリサービスを選択
- サインイン後、上部のメニューから「Repositories」リンクを選択
もう一回 Google アカウントでサインイン
- 何で二回目があるのか、よく分からないが再度 Google アカウントでログイン
Jenkins for GAE と、CloudBees の共通のアカウント?
リポジトリの作成
- サインイン後のリポジトリ管理画面から「Create new code repository」ボタンを押下し、新しいリポジトリを作成する
- 「Name」部分にリポジトリ名を入力
- 「Permission Scheme」部分は「Private (users from your account only)」を選択 (非公開として使用します)
- 「Repository Type」部分は「Git」を選択
作成した Git リポジトリに接続
SSH 鍵の生成
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users/Suna/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/Suna/.ssh/id_rsa. Your public key has been saved in /Users/Suna/.ssh/id_rsa.pub. The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Suna@xxxxxx The key's randomart image is: +--[ RSA 2048]----+ | E+. | | o . | | . . . | | o .. o | | + = oS . | | * = + . | | . o * .. | | = +. | | . o.. | +-----------------+ $ cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc……
Cloudbees に公開鍵を設定
- リポジトリ管理画面の鍵の設定リンクを押下し、公開鍵をコピー & ペースト
Cloudbees に作成した Git リポジトリのクローン作成
$ git clone ssh://git@git.cloudbees.com/xxxxxx/pluscheckin.git Cloning into 'pluscheckin'... Identity added: /Users/Suna/.ssh/id_rsa (/Users/Suna/.ssh/id_rsa) warning: You appear to have cloned an empty repository.
クローンしたローカルリポジトリにファイルを追加
$ cd pluscheckin $ git add …… $ git commit
ローカルリポジトリの内容を Cloudbees に push
$ git push origin master Counting objects: 39, done. Delta compression using up to 4 threads. Compressing objects: 100% (35/35), done. Writing objects: 100% (39/39), 32.82 KiB, done. Total 39 (delta 8), reused 0 (delta 0) To ssh://git@git.cloudbees.com/xxxxxx/pluscheckin.git * [new branch] master -> master