Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CircleCI Orbsの紹介
Search
Kishin Yagami
December 03, 2018
Technology
1
2.8k
CircleCI Orbsの紹介
* CircleCI Orbsとは
* Orbの書き方
* Orb Good Practices
Kishin Yagami
December 03, 2018
Tweet
Share
Other Decks in Technology
See All in Technology
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
180
型情報を用いたLintでコード品質を向上させる
sansantech
PRO
2
170
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
190
.NET 9 のパフォーマンス改善
nenonaninu
0
1.7k
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.6k
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
3
360
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
200
Storage Browser for Amazon S3
miu_crescent
1
320
ISUCON、今年も参加してみた / ISUCON, I challenged it again this year.
dero1to
0
110
AWS re:Invent 2024 recap
hkoketsu
0
570
英語が苦手でも学びが得られるWorkshopについて / About the workshop of re:Invent 2024
taquakisatwo
0
560
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
1
4.8k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How to train your dragon (web standard)
notwaldorf
88
5.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Into the Great Unknown - MozCon
thekraken
34
1.6k
Side Projects
sachag
452
42k
Agile that works and the tools we love
rasmusluckow
328
21k
How GitHub (no longer) Works
holman
311
140k
Code Reviewing Like a Champion
maltzj
521
39k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Being A Developer After 40
akosma
89
590k
Transcript
CircleCI Orbsͷհ Rocro ιϑτΣΞΤϯδχΞ ീਆ (@ks888sk) 1
CircleCI Orbsͱ • CircleCIͷઃఆΛڞ༗͢ΔͨΊͷΈ • ઃఆΛOrbͱ͍͏୯ҐͰύοέʔδԽɾެ։ɾར༻ !2 (circleci.com)
Orbར༻ྫɿSlack௨ • Before (circleci.com/orbs/registry/orb/circleci/slack) !3
Orbར༻ྫɿSlack௨ • After !4
• Orbs registry: https://circleci.com/orbs/registry • ӈ্ͷʮShow all orbsʯΛԡ͢ͱɺશorb͕ग़Δ • ݸਓతʹؾʹͳͬͨorbs
Explore Orbs orb໊ ֓ཁ circleci/aws-s3 S3ͷΞοϓϩʔυ/μϯϩʔυ circleci/docker-publish Docker imageͷެ։ h-matsuo/github-release GitHubͷՌϦϦʔε postman/newman postmanͷ࣮ߦ urahiroshi/npm-audit npm auditͷ࣮ߦͱϨϙʔτ !5
Orbͷॻ͖ํ • “Hello world” orb (circleci.com/orbs/registry/orb/ks888/greeting) !6
Orbͷॻ͖ํ • “Hello world” orb (circleci.com/orbs/registry/orb/ks888/greeting) orbͷ֓ཁ (circleci.com/orbs/registry/) !7
Orbͷॻ͖ํ • “Hello world” orb (circleci.com/orbs/registry/orb/ks888/greeting) ͍ํ (circleci.com/orbs/registry/orb/ks888/greeting) !8
Orbͷॻ͖ํ • “Hello world” orb (circleci.com/orbs/registry/orb/ks888/greeting) !9 ίϚϯυ໊ ίϚϯυͷύϥϝʔλ ίϚϯυͷ࣮
࡞ͨ͠orb • Inspecode (rocro.com/inspecode) • ίʔυͷ੩తղੳαʔϏε • InspecodeͷղੳδϣϒΛ։࢝ˍྃΛͭorbΛ࡞ • github.com/rocro/orb-inspecode
Start new job Execute job Polling Orb Inspecode !10
Orb Good Practices #1 • ࣮ߦ࣌ؒΛݟੵΔ • ࣗͷϨϙδτϦ ≠ ϢʔβʔͷϨϙδτϦ
• ίʔυߦ͕10ʙ100ഒҧ͏͔͠Εͳ͍ɻɻ • ґଘϥΠϒϥϦͷ͕ʢུʣ • Ξοϓϩʔυ͢ΔόΠφϦͷαΠζ͕ʢུʣ • 10Λ͑ΔՄೳੑ͕͋Δ߹ɺճආࡦΛ༻ҙ͢Δͱྑͦ͞͏ • σϑΥϧτͩͱίϚϯυ͕10ͰλΠϜΞτ͢Δ !11
Orb Good Practices #1 • Inspecode orbͷ߹ • ίʔυߦ/ґଘϥΠϒϥϦ/ղੳ༰ͷӨڹΛड͚Δ •
max_waitύϥϝʔλΛ༻ҙ • no_output_timeoutʹઃఆ !12
Orb Good Practices #2 • ϝοηʔδ෦Λڧௐ͢Δ • ݟͯ΄͍͠Օॴ ≠ Ϣʔβʔ͕ݟͯ͠·͏Օॴ
!13
Orb Good Practices #2 • ϝοηʔδ෦Λڧௐ͢Δ • ݟͯ΄͍͠Օॴ ≠ Ϣʔβʔ͕ݟͯ͠·͏Օॴ
!14 ݟͯ΄͍͠ ϝοηʔδ
Orb Good Practices #2 • Inspecode orbͷରԠɿจࣈͷ৭͚ɺֆจࣈ !15
Orb Good Practices #3 • CI/CD • Inspecode orbͷ߹ Kick
CircleCI 1. Packaging orb 3. Publish to orb registry !16 2. Test CircleCI
Orb Good Practices #3 • 1. Packaging orb • circleci/orb-tools
orbͷpackδϣϒ !17
Orb Good Practices #3 • 2. Test • ςετέʔεྫ !18
ςετ༻ઃఆϑΝΠϧ ظ͢Δ݁Ռ ɾδϣϒ͕ޭ͢Δ͜ͱ ظ͢Δ݁Ռ ɾδϣϒ͕ࣦഊ͢Δ͜ͱ ςετ༻ઃఆϑΝΠϧ ࣮ߦ ࣮ߦ
Orb Good Practices #3 • 2. Test • ςετέʔε͝ͱʹorb-tools orbͷtest-in-buildsδϣϒΛ࣮ߦ
• δϣϒ෦ͰϩʔΧϧδϣϒ͕࣮ߦ͞ΕΔ • Ұ෦ɺ࣮ࡍͷδϣϒ࣮ߦڥͱҟͳΔ • ྫɿCIRCLE_PROJECT_USERNAMEͳͲͷڥม͕ͳ͍ • Inspecode orbͷ߹ɿ test-in-buildsδϣϒΛҰ෦मਖ਼ͨ͠ ͷΛར༻ !19
Orb Good Practices #3 • 3. Publish to orb registry
• circleci/orb-tools orbͷpublishδϣϒ !20
·ͱΊ • CircleCI Orbsͱ • Orbͷॻ͖ํ • Orb Good Practices
• #1 ࣮ߦ࣌ؒΛݟੵΔ • #2 ϝοηʔδ෦Λڧௐ͢Δ • #3 CI/CD !21
ࢀߟࢿྉ • CircleCI Orbs ೖ • https://blog.tsub.me/post/introducing-to-circleci-orbs/ • CircleCI orb
Perfect Testing • https://sue445.hatenablog.com/entry/2018/11/16/125251 • Testing orbs • https://github.com/CircleCI-Public/config-preview-sdk/blob/master/docs/ orbs-testing.md • circleci/orb-tools • https://circleci.com/orbs/registry/orb/circleci/orb-tools !22