初めてJenkinsというものを触ってみたのでメモ。
このやり方でいいのか分かりません。。
homebrewをインストール
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
jenkinsをインストール
$ brew install jenkins
jenkinsでjobを作成する
ご自由に。
AppleからJAVAプログラムをダウンロードしてくる
【公式Doc】http://www.apple.com/itunesnews/docs/AppStoreReportingInstructions.pdf
この12Pくらいに「autoingestion.zip」があるのでダウンロードする
作成したjobのワークスペースに上記のzipの中身を展開する
zipの中のautoingestion.propertiesにiTunesConnectのID、PASSを設定する
jenkinsで以下のシェルを実行する
REPORT_DATE=`date -v-2d +%Y%m%d`
echo $REPORT_DATE
java Autoingestion autoingestion.properties <ベンダーID> Sales Daily Summary $REPORT_DATE
gunzip -f S_D_<ベンダーID>_$REPORT_DATE.txt.gz
mv -f S_D_<ベンダーID>_$REPORT_DATE.txt report_$REPORT_DATE.txt
mv report_$REPORT_DATE.txt <Dropboxのパス>
スケジュールで毎日12時に設定する
crontab
http://ja.wikipedia.org/wiki/Crontab
0 12 * * *