Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Orbs開発の流れ ~はじめの一歩から、組織的にメンテしていくための環境構築まで / Fl...

Orbs開発の流れ ~はじめの一歩から、組織的にメンテしていくための環境構築まで / Flow of Orbs Development

CircleCI ユーザーコミュニティミートアップ #4
https://circleci.connpass.com/event/125622/

More Decks by 株式会社ヌーラボ

Other Decks in Technology

Transcript

  1. ·ͣ͸ಈ࡞֬ೝ wΠϯϥΠϯ0SC͕͓खܰ w version: 2.1 orbs: example: commands: my_command: parameters:

    my_name: type: string steps: - run: echo "hello <<parameters.my_name>>" jobs: build: docker: - image: circleci/node:4.8.2 steps: - example/my_command: my_name: ikikko ΠϯϥΠϯͰల։ ͍ͯ͠Δ෦෼
  2. ·ͣ͸ಈ࡞֬ೝ wखݩͰ࣮ߦ # OrbΛల։ʢ2019/05࣌఺ɺOrbΛϩʔΧϧͰ௚઀࣮ߦͰ͖ͳ͍ͨΊʣ $ circleci config process .circleci/config.yml >

    .circleci/processed.config.yml # ల։͞ΕͨϑΝΠϧΛϩʔΧϧͰ࣮ߦ $ circleci local execute -c .circleci/processed.config.yml ͜͜·Ͱɺ$JSDMF$*Λ௨ ৗͲ͓Γར༻͢Δ஌ࣝͩ ͚Ͱʢ΄΅ʣରԠՄೳ
  3. QVCMJTIͯ͠ΈΑ͏ wηοτΞοϓ # namespaceͷ࡞੒ $ circleci namespace create <name> <vcs-type>

    <org-name> $ circleci namespace create nulab github nulab # orbͷ࡞੒ $ circleci orb create <namespace>/<orb> $ circleci orb create nulab/typetalk-orb
  4. QVCMJTIͯ͠ΈΑ͏ w1VCMJTI w # खݩͰorbͷಈ࡞֬ೝ͕औΕͨΒɺorb.ymlʹ੾Γग़͓ͯ͘͠ # ։ൃ༻όʔδϣϯͷpublish $ circleci orb

    publish <path> <namespace>/<orb>@<version> $ circleci orb publish orb.yml nulab/typetalk-orb@dev:alpha # ຊՔಇ༻όʔδϣϯͷpublish $ circleci orb publish promote <namespace>/<orb>@<version> <segment> $ circleci orb publish promote nulab/typetalk-orb@dev:alpha major 4FN7FSʹͷͬͱ͍ͬͯΔ NBKPSNJOPSQBUDI
  5. ΈΜͳͰϝϯςͰ͖ΔΑ͏ʹ wσϑΝΫτͳύοέʔδߏ੒ w src ├── @orb.yml ├── commands │ ├──

    notify.yml │ └── status.yml ├── examples │ ├── notify.yml │ └── status.yml ├── executors │ └── ... └── jobs └── ... # 1ϑΝΠϧ΁ύοέʔδԽʢޙड़ͷCI/CDϫʔΫϑϩʔதͰࣗಈͰద༻͞ΕΔʣ $ circleci config pack src > orb.yml