Top Banner
Build an iOS app with ConcourseCI @tenten0213 Concourse CI/CD Meetup Tokyo #5 !
23

Build an iOS app with ConcourseCI

Mar 21, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Build an iOS app with ConcourseCI

Build an iOS app with

ConcourseCI

@tenten0213

Concourse CI/CD Meetup Tokyo #5 !

Page 2: Build an iOS app with ConcourseCI

• @tenten0213

• SIerの雑食系エンジニア

• Java, Swift, JavaScript, Ruby, Python, COBOL…

• スクラムマスター

• Jenkins職人(引退)

自己紹介

Page 3: Build an iOS app with ConcourseCI

http://qiita.com/tenten0213/items/7a362a4b9d65040d93d6

Page 4: Build an iOS app with ConcourseCI

なぜここに立っているのか

Page 5: Build an iOS app with ConcourseCI

iOSアプリ開発やっている人?

• Java(JVM)?

• Ruby ?

• Python ?

• PHP ?

Page 6: Build an iOS app with ConcourseCI

Motivation

Page 7: Build an iOS app with ConcourseCI

Jenkins職人問題• GUIでの設定

• 環境設定

• パイプライン

• レポーティング

• あれ、shell書いてる…

• プラグイン選択

前どうやったっけ?

どこか設定弄ったら動かなくなったぞ?

なんでこうなってるの?

Page 8: Build an iOS app with ConcourseCI

他はコード化・設定ファイル化済• Gem

• Gemfile(.lock)

• Fastlane

• Fastfile

• CocoaPods

• Podfile(.lock)

• SwiftLint

• .swiftlint.yml

→ 後はビルドパイプラインだけ

Page 9: Build an iOS app with ConcourseCI

Jenkinsでも出来るけど…

https://concourse.ci/concourse-vs.html#jenkins

Page 10: Build an iOS app with ConcourseCI
Page 11: Build an iOS app with ConcourseCI

Concourseのアーキテクチャ

パイプラインベースのCI/CDツール Concourse CI入門 - BLOG.IK.AM https://blog.ik.am/entries/379

Page 12: Build an iOS app with ConcourseCI

iOSアプリをビルドするには

macOSでworker を立てればOK

Page 13: Build an iOS app with ConcourseCI

試した構成ATC

web UI & build scheduler

https://i2.wp.com/blog.docker.com/media/docker-whales-transparent.png

macOS

TSA worker registration & forwarding

Workers container runtime & cache management

/usr/local/bin/concourse

8080

2222

Page 14: Build an iOS app with ConcourseCI

Concourseのインストール

Docker Composeで構築(ホント楽)

https://concourse.ci/docker-repository.html

https://www.docker.com/

Page 15: Build an iOS app with ConcourseCI

Workerの設定と起動

Mac用のバイナリ(concourse_darwin_amd64)を取得 https://github.com/concourse/concourse/releases

実行パスの通った場所に配置。 Worker用の鍵を生成とauthorized_worker_keysへの追加

Workerの起動

Page 16: Build an iOS app with ConcourseCI

docker-compose.ymlの修正

"failed to dial: failed to connect to TSA: dial tcp 127.0.0.1:2222: getsockopt: connection refused"

Workerを起動するとTSAとの接続エラーがでるので docker-compose.ymlを修正する。

Page 17: Build an iOS app with ConcourseCI

パイプラインを登録する

platformはdarwinで

ごにょごにょ

Page 18: Build an iOS app with ConcourseCI

ごにょごにょ💩

https://guides.cocoapods.org/using/troubleshooting.html#im-getting-permission-errors-while-running-pod-commands

CocoaPodsがrootで実行できないので 権限周りをごにょごにょと

Page 19: Build an iOS app with ConcourseCI

env 😇

Page 20: Build an iOS app with ConcourseCI

Fastlaneで実行 🚀

https://github.com/fastlane/fastlane

Page 21: Build an iOS app with ConcourseCI

30回目にて🍻

Page 22: Build an iOS app with ConcourseCI

残課題 (試せてない) 🤓

• レポートの出し先どうするか

• チャットへの通知

• マルチブランチビルド

出来たらJenkinsから置き換えるかも?

Page 23: Build an iOS app with ConcourseCI