Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
circleci小ネタ集 / circleci_tips
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jun Watanabe
May 26, 2016
Programming
2.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
circleci小ネタ集 / circleci_tips
コード改善 meetup #1
http://kaizen.connpass.com/event/31378/
Jun Watanabe
May 26, 2016
More Decks by Jun Watanabe
See All by Jun Watanabe
Jamf Connect ZTNAとMDMで実現! 金融ベンチャーにおける「デバイストラスト」実例と軌跡 / Kyash Device Trust
rela1470
1
3k
20分1発勝負! 社内Webツールをライブコーディングするぞ! / Live Coding PHPerKaigi 2025
rela1470
0
40
力技で実現するHR Driven Provisioningとアクセス制御の自動化 / kyash-hr-driven-provisioning
rela1470
0
1.6k
10分(25分)でつくる社内Webツール / howto-oidc-webpage
rela1470
0
190
リーグオブ情シス 第二回 / League of Infosys
rela1470
1
1.5k
Kyashでコーポレートエンジニアを初採用して7ヶ月が経ちましたがお元気ですか / ce-night-kyash
rela1470
4
3.4k
じこしょうかい2019 / rela1470-portfolio-2019
rela1470
0
420
255オクテットのドメインはツラみがある! / endless-work
rela1470
1
5.6k
ヤフーの1on1
rela1470
0
570
Other Decks in Programming
See All in Programming
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
130
Modernizing iOS Apps
seyfoyun
0
150
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
LLM 101
dalinaum
0
460
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
120
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
280
Getting Started with Vibe Coding
miccheng
0
180
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
280
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.5k
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
220
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
320
Prompt Engineering for Job Search
mfonobong
0
570
Skip the Path - Find Your Career Trail
mkilby
1
280
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Optimizing for Happiness
mojombo
378
71k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
A better future with KSS
kneath
240
18k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
890
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
520
How STYLIGHT went responsive
nonsquared
100
6.3k
What's in a price? How to price your products and services
michaelherold
247
13k
Transcript
circleciখωλू 2016/05/26 ίʔυվળ meetup #1 Jun Watanabe
Jun Watanabe @rela1470 • ͪͺʔ6 • ORATTA, Inc Chief Engineer
• http://rela.red/ ʘWe are hiring!ʗ
ίʔυվળͱ͍͑ CIπʔϧ͔ͳ
ઌ݄ɺ ΦϯϓϨJenkins͔Β circleciʹશҠߦ͠·ͨ͠!
https://speakerdeck.com/ rela1470/jenkins-kill
Βͳ͔ͬͨ͜ͱ + ͦͷޙࠔͬͨ͜ͱ ͬͨ͜ͱ
PHP 5.5 PHPUnit GitHub circleci FREE Plan
෩࿊෦(੍ࣾ) िʹ3࣌ؒձٞࣨʹͬͯ ͻͨ͢Βۀվળɾٕज़ௐࠪ ORATTA Frontier TechͷଏশΒ͍͠
ෳGitͷClone
1ϓϩδΣΫτ 5ͭ͘Β͍ͷgitʹ ͔Ε͍ͯΔ
ϓϩδΣΫτͷgitஔྫ multi [multi.git] //ࣗࣾϑϨʔϜϫʔΫ !system ɹ"addon ɹ#ɹ!asuka [asuka.git] //ϓϩδΣΫτຖͷಠ࣮ࣗιʔε ɹ#ɹɹ"master
[asuka-master.git]ɹ//ΞΠςϜͷϚελʔઃఆ ɹ#ɹɹ!web [asuka-web.git]ɹ//ը૾Ի ɹ!lib[lib.git] //ࣗࣾϥΠϒϥϦ
Jenkins Multiple SCMs Plugin
circleciͰͲ͏͢Δ͔
circle.ymlͰؤுΔ
git cloneͯ͠ ࣗͰஔ͠ͳ͓͢ checkout: post: - "git clone -b ${CIRCLE_BRANCH}
[email protected]
:oratta-inc/ multi.git /home/ubuntu/multi" - "git clone -b ${CIRCLE_BRANCH}
[email protected]
:oratta-inc/ lib.git /home/ubuntu/multi/system/lib" - "mkdir /home/ubuntu/multi/system/addon" test: pre: - "cp -a /home/ubuntu/${CIRCLE_PROJECT_REPONAME}/ /home/ubuntu/ multi/system/addon/${CIRCLE_PROJECT_REPONAME}" - "git clone -b ${CIRCLE_BRANCH}
[email protected]
:oratta-inc/ asuka-master.git /home/ubuntu/multi/system/addon/asuka/master"
ݖݶͲ͏ͳͬͯΔͷ?
Deploy keysΛ͏ͱ ֘1ϦϙδτϦͷΈ
user keyʹࠩ͠ସ͑ͯ Ϣʔβʹඥ͍ͨݖݶΛऔಘ
user keyʹࠩ͠ସ͑ͯ Ϣʔβʹඥ͍ͨݖݶΛऔಘ
αϒϞδϡʔϧԽ Ζ͏ͱͯ͠·͢ @ࠓத͘Β͍...
Ϗϧυͷखಈ࣮ߦ
εέδϡʔϧϏϧυ खಈϏϧυ Ͱ͖ͳ͘ͳΔͷ?
͔ͨ͠ʹWebUIͳ͍
RestAPI͕͋Δ!
՝ۚػೳҎ֎શ෦Ͱ͖ΔΑ!
branchΛࢦఆͯ͠ ৽ϏϧυΛߦ͏API curl -X POST https://circleci.com/api/v1/project/:username/:project/ tree/:branch?circle-token=:token
εέδϡʔϧϏϧυ cronͰୟ͘ खಈϏϧυ खͰୟ͘
ΧόϨοδूܭ
ΧόϨοδूܭ͍ͨ͠ දͰݟ͍ͨ
XdebugΛONʹ sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/ xdebug.ini
--coverage-html Ͱ $CIRCLE_ARTIFACTS ʹग़ྗͨ͠ΒOK
ͻͱ͕ͭ...
None
None
Ϗϧυʹ20
pushͷʹ20ͪ ͕͢͞ʹࠔΔ...
ۚͰԥΔͷ࠷ޙͷखஈ
Ϗϧυ࣌ؒͷॖ
ผʹPush࣌ ຖճΒͳͯ͘ ि1͘Β͍Ͱྑ͍
ҾͰ໌ࣔతʹ ͚ͨ࣌ͩ͠ ΧόϨοδूܭ
͜ΜͳγΣϧεϓϦΫτ ࡞Γ·ͨ͠ test: override: - sh test.sh if [[ -v
RUN_COVERAGE ]] then sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/ xdebug.ini phpunit -c phpunit.xml --coverage-html=${CIRCLE_ARTIFACTS} else phpunit -c phpunit.xml fi circle.yml test.sh
XdebugΛONʹ͢Δͱ PHPUnit͕ॏ͘ͳΔ
औಘ͢Δ͚࣌ͩ XdebugΛONʹ͢Δ
REST APIͰbuild_parameters Λ༩ͯ͠Ϗϧυ curl -X POST --header "Content-Type: application/json" -d
'{"build_parameters": {"RUN_COVERAGE": "true"}}' https:// circleci.com/api/v1/project/username/reponame/tree/branch?circle- token=hogehoge
݄༵ͷேʹ cronͰճͯ͠·͢
γεςϜ؆ུԽ
͜ΜͳγΣϧεϓϦΫτ ࡞Γ·ͨ͠ test: override: - sh test.sh if [[ -v
RUN_COVERAGE ]] then sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/ xdebug.ini phpunit -c phpunit.xml --coverage-html=${CIRCLE_ARTIFACTS} else phpunit -c phpunit.xml fi circle.yml test.sh
࣮circle.yml͚ͩͰग़དྷΔ test: override: - | if [[ -v RUN_COVERAGE ]]
then sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/ conf.d/xdebug.ini phpunit -c /home/ubuntu/multi/system/addon/$ {CIRCLE_PROJECT_REPONAME}/phpunit.xml -d memory_limit=1024M -- coverage-html=${CIRCLE_ARTIFACTS} else phpunit -c /home/ubuntu/multi/system/addon/$ {CIRCLE_PROJECT_REPONAME}/phpunit.xml -d memory_limit=1024M
yamlͷϒϩοΫελΠϧ վߦΛอଘ | |+ |- վߦΛ֯εϖʔεʹ > >+ >- Πϯσϯτࢦఆ
|1 >1
circle.yml ͚ͩͰग़དྷΔ
1ϑΝΠϧͰ ग़དྷΔͳΒ ͤ
σάϨΔ͜ͱͳ͘ શҠߦग़དྷ·ͨ͠(^o^)
http://connpass.com/event/32338/
ʘWe are hiring!ʗ http://www.oratta.net/