Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS CDKにコントリビュートするための具体的な方法 / how-to-aws-cdk-contribute

tomoki10
October 21, 2020

AWS CDKにコントリビュートするための具体的な方法 / how-to-aws-cdk-contribute

AWS DevDay Online Japanの登壇資料です。
AWS CDKにこれからコントリビュートしてみたい方向けの資料です。
実際にコントリビュートした際に考えたことや困った部分などを紹介しているので良ければ参考にしてください。

tomoki10

October 21, 2020
Tweet

More Decks by tomoki10

Other Decks in Technology

Transcript

  1. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDKʹίϯτϦϏϡʔτ͢ΔͨΊͷ
    ۩ମతͳํ๏
    ࠤ౻ஐथ
    Ϋϥεϝιου גࣜձࣾ
    B - 0 6
    2 0 . 1 0 . 2 0 2 0

    View Slide

  2. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ࣗݾ঺հ
    - ࠤ౻ஐथ
    - Ϋϥεϝιουגࣜձࣾ
    - CXࣄۀຊ෦ʢIoTνʔϜͱࣗࣾαʔϏε։ൃʣ
    - લ৬ɿSIerͷSEΛ4೥ऑ
    - ݱࡏɿαʔόʔαΠυΤϯδχΞ
    - ޷͖ͳAWSαʔϏεɿLambdaɺCDK
    @tmk2154
    @tomoki10

    View Slide

  3. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ΞδΣϯμ
    - ର৅ͱ͢Δࢹௌऀ
    - ίϯτϦϏϡʔτ͢Δͱྑ͍͜ͱ
    - AWS CDKͷߏ੒ͱৄࡉ
    - ίϯτϦϏϡʔςΟϯάΨΠυͷઆ໌
    - ࣮ࡍʹίϯτϦϏϡʔτͨ͠ྲྀΕ
    - ·ͱΊ

    View Slide

  4. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ର৅ͱ͢Δࢹௌऀ
    - AWS CDK or େ͖ΊͷOSSʹίϯτϦϏϡʔτͯ͠Έ͍ͨਓ
    ΤϯδχΞ΍ͬͯΔΜͩ͠Ұ౓͙Β͍͸΍ͬͯΈ͍ͨ
    ͔ͤͬͩ͘͠υΩϡϝϯτ͚ͩ͡Όͳͯ͘ιʔε΋ίϛοτ͍ͨ͠
    - AWS CDK͸಺෦ߏ੒Λগ͠஌Γ͍ͨ
    దٓઆ໌͸ೖΕ·͕͢ɺAWS CDKͷBlackBeltΛݟ͍ͯΔͱ෼͔Γ΍͍͔͢΋
    ໨ඪ
    - ʮ͜ΕͳΒࣗ෼Ͱ΋ग़དྷͦ͏ʂʯͱࢥͬͯ΋Β͏͜ͱ

    View Slide

  5. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ίϯτϦϏϡʔτ͢Δͱྑ͍͜ͱ
    - ษڧʹͳΔ
    ීஈCDKΛ࢖͏ࡍʹߏ੒Λཧղ͍ͯ͠Δͱগ͠͸ૣ࣮͘૷Ͱ͖Δ
    CloudFormationͷ੍໿͔CDKͷ໰୊͔ͷ۠ผ͕͖ͭ΍͍͢
    - Կͷػೳ͕Ͱ͖Δͷ͔͍ͪૣ͘஌ΕΔ
    ઌ೔ൃද͞ΕͨCLF͔ΒCDKͷϚΠάϨʔγϣϯ΍v2ͷৄࡉΛઌʹ஌ΕΔ
    - ࣗ෼ͷιʔε͕ҙ֎ͳͱ͜Ͱग़ͨΓͯ͠໘ന͍

    View Slide

  6. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - Building Real-time Backends with AWS AppSync & CDK
    CDK Dayͷ༷ࢠ
    https://www.youtube.com/watch?v=qJutZqXMdgM&t=4616s

    View Slide

  7. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDKͷߏ੒ͱৄࡉ

    View Slide

  8. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDK(Cloud Developer Kit)ͱ͸
    - ࢖͍׳ΕͨݴޠͰAWSϦιʔεΛϓϩϏδϣχϯάͰ͖ΔπʔϧΩοτ
    - ݱࡏ͸TS/JSɺPythonɺJavaɺC#Ͱ࢖༻Մೳ(ࠓޙ͸Go΋?)
    πʔϧͷ಺෦ͷ։ൃ͸TypeScriptϝΠϯ
    - ϓϩάϥϛϯάݴޠͰϦιʔε؅ཧ͕Ͱ͖Δ
    →ਅͷIaCπʔϧ(ݸਓͷײ૝Ͱ͢)
    - ͍ͣΕ͸ CDK for TerraformͰGCP΍Azure΋؅ཧ? AWS Cloud
    Development Kit

    View Slide

  9. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDKͷݸਓతʹࢥ͏ར఺(BlackBeltΑΓҰ෦Ҿ༻)
    - ΤσΟλͰܕνΣοΫɺαδΣετɺ࢓༷ࢀর͕Ͱ͖Δ
    →WebυΩϡϝϯτͳ͠Ͱ΋࢓༷ͷ֬ೝ΍࣮૷͕Մೳ
    - Ұൠʹίʔυྔ͕ݮΔ
    →SQS+Lambda+SNS͕CloudFormationͷ࣮૷ͩͱ340ߦఔ
    ɹCDKͩͱ100ߦఔ˞
    ※ʮMoving from CFN YAML to CDK - Benefits, how to do it in prod and moreʯ
    ɹhttps://www.youtube.com/watch?v=qJutZqXMdgM&t=12485s
    - ෳ਺ελοΫؒͷґଘؔ܎͕هड़Ͱ͖Δ
    →؆қͳίʔυͰAPI Gateway+LambdaͳͲΛผελοΫʹॻ͚ΔͳͲ

    View Slide

  10. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDK
    ΞϓϦέʔγϣϯͷߏ੒
    - App
    - CloudFormationςϯϓϨʔτੜ੒ͱ
    σϓϩΠʹ࢖༻͞ΕΔཁૉ
    - ελοΫؒͷґଘؔ܎Λఆٛ
    - Stack
    - CloudFormationͰ͍͏ελοΫ
    - σϓϩΠͷ࠷খ୯Ґ
    - Construct
    - Stack಺Ͱੜ੒͢ΔAWSϦιʔε
    - Construct LibraryͰఆٛ
    Ҿ༻ݩ:
    https://aws.amazon.com/jp/blogs/aws/boost-your-infrastructure-with-cdk/

    View Slide

  11. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    AWS CDK
    ΞϓϦέʔγϣϯͷߏ੒
    - App
    - CloudFormationςϯϓϨʔτੜ੒ͱ
    σϓϩΠʹ࢖༻͞ΕΔཁૉ
    - ελοΫؒͷґଘؔ܎Λఆٛ
    - Stack
    - CloudFormationͰ͍͏ελοΫ
    - σϓϩΠͷ࠷খ୯Ґ
    - Construct
    - Stack಺Ͱੜ੒͢ΔAWSϦιʔε
    - Construct LibraryͰఆٛ
    Ҿ༻ݩ:
    https://aws.amazon.com/jp/blogs/aws/boost-your-infrastructure-with-cdk/

    View Slide

  12. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    Constructͷߏ੒
    - L1 (Low Level) Construct
    CloudFormationͷϦιʔεͱ
    1ର1ͰରԠ (ࣗಈੜ੒)
    - L2 (High Level) Construct
    σϑΥϧτ஋΍௥Ճͷؔ਺Λ࣮૷͠
    ͯL1 ConstructΛந৅Խ
    ɹ
    - L3 Construct (Patterns or etc…)
    ෳ਺Ϧιʔε΍L2 ConstructΛ͞Β
    ʹந৅Խͯ͠ར༻͢Δ৔߹
    Ҿ༻ݩ:
    https://aws.amazon.com/jp/blogs/aws/boost-your-infrastructure-with-cdk/

    View Slide

  13. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    TIPS: Constructͷߏ੒(AppSyncͷ۩ମྫ)
    - ϕʔεͱͳΔιʔε
    GithubϦϙδτϦɿhttps://github.com/aws/aws-cdk
    ্هϦϙδτϦͷ aws-cdk/packages/@aws-cdk/aws-appsync
    @aws-cdk഑Լʹ֤AWSϦιʔε༻ͷύοέʔδ͕͋Δ
    - L1 (Low-Level) Construct
    aws-appsync/lib ഑Լͷ appsync.generated.ts ϑΝΠϧ
    Ϗϧυ͠ͳ͍ͱੜ੒͞Εͳ͍(GitHub্Ͱݟ͑ͳ͍)ͷͰ Gitpod ͳͲͰ֬ೝ
    - L2 (High-Level) Construct
    graphqlapi.tsɺschema-base.ts ͳͲ͍͔ͭ͘ͷϑΝΠϧʹ෼͔Ε͍ͯΔ

    View Slide

  14. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ίϯτϦϏϡʔςΟϯάΨΠυͷઆ໌

    View Slide

  15. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ίϯτϦϏϡʔςΟϯάΨΠυͱ͸
    - OSS΁ߩݙ͍ͨ͠ਓ޲͚ʹઃܭ΍࣮૷ํࣜΛڞ༗͢ΔυΩϡϝϯτ
    https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md#partial-build-tools
    https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md

    View Slide

  16. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ίϯτϦϏϡʔςΟϯάΨΠυͷ಺༰
    • PRΛૹΔ·Ͱஈ֊͝ͱʹ΍Δ΂͖͜ͱͳͲ͕ॻ͔Ε͍ͯΔ
    ɹࠓճ͸ҎԼͷ3ͭΛத৺ʹ঺հ
    - ؀ڥߏங
    - issue͔Β࣮૷Ϛʔδ·ͰͷྲྀΕ
    - ֤छπʔϧͷ঺հ

    View Slide

  17. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ؀ڥߏங
    Gitpod
    ɹGitHub͔ΒϫϯΫϦοΫͰ؀ڥߏஙͯ͠࢖͑ΔWebIDE(ࠓճ঺հ)
    ɹˠιʔεͷ֬ೝ΍ͪΐͬͱͨ͠मਖ਼Ͱ༗༻
    Docker
    ɹDockerΠϝʔδ͔Β؀ڥ࡞੒
    ɹˠܧଓతͳ։ൃͰ༗༻
    ϩʔΧϧ؀ڥ
    ɹNode.js΍JavaͷόʔδϣϯΛ߹Θͤͯߏங
    ɹˠ؀ڥͷ؅ཧ͕େมͳͷͰଟ෼ඇਪ঑

    View Slide

  18. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    Gitpodͱ͸
    - GitHub͔ΒϫϯΫϦοΫͰ؀ڥߏஙͯ͠࢖͑ΔWebIDE
    - VS Code ϥΠΫͳ։ൃ؀ڥ͕Web্Ͱ࢖͑Δ
    - ॳظͷϏϧυઃఆ΋͋ΔͷͰϫϯΫϦοΫͰ࣮૷͕࢝ΊΒΕΔ
    - 1ϲ݄Ͱ50࣌ؒ·Ͱ͸ແྉ

    View Slide

  19. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    TIPS: GitpodΛCDKͷ։ൃͰ࢖͏৔߹ͷ஫ҙ఺
    - Gitpodॳճىಈ͸1࣌ؒऑ͔͔Δ
    ɹશମϏϧυ͕૸ΔͷͰ্ཱ͕ͪΔ·Ͱ͕஗͍ɻ1ճϏϧυ͕௨Ε͹࠶ىಈ࣌͸਺෼ఔ౓Ͱಈ࡞Մೳ
    ɹ 2ճ໨Ҏ߱ͷىಈ͸Gitpodͷը໘Ͱߦ͏ɻ(ઌ΄ͲͷϘλϯΛԡ͢ͱຖճ৽͍͠Πϯελϯε͕Ͱ͖Δ)
    - ్தͰϏϧυ͕͚͜ΔͱผͷϦιʔεͷ͍ͤͰςετ͕௨Βͳ͍࣌΋͋Δ
    ɹର৅ͷσΟϨΫτϦʹͯ scripts/buildup(ޙड़) Ͱؔ࿈͢ΔϦιʔεΛ࠶౓Ϗϧυ͢Δͱଟ෼େৎ෉
    ɹ ࠷ѱ৽͍͠Gitpodͷ؀ڥΛ্ཱͪ͛Δ
    - Gitpod্ͷAccess Control※ͰݖݶΛ༩͑ͳ͍ͱPushͰ͖ͳ͍
    ɹGitpodͷWebUIͰʮwrite public reposʯͷݖݶΛ༩͑Δ͜ͱ
    ※https://gitpod.io/access-control/

    View Slide

  20. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    issue͔Β࣮૷Ϛʔδ·ͰͷྲྀΕ
    - ίϯτϦϏϡʔςΟϯάΨΠυΛϕʔεʹগ͠ม͍͑ͯ·͢
    - issueΛཱͯΔ/୳͢
    - ઃܭ(Φϓγϣϯ)
    - ࣮૷(Magic)
    ‣ ࣮૷ɺ୯ମ/݁߹ςετ
    ‣ ಈ࡞֬ೝ
    - ίϛοτ࡞੒ϧʔϧΛ֬ೝ
    - PRͷ࡞੒
    - ϨϏϡʔ/Ϛʔδ
    ίϯτϦϏϡʔςΟϯάΨΠυͷྲྀΕ

    View Slide

  21. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    issueΛཱͯΔ/୳͢
    - طଘͷissueΛ֬ೝͯ͠ɺ৽͍͠໰୊Ͱ͋Ε͹issueΛཱͯΔ
    ɹணखͰ͖ͦ͏Ͱ͋Ε͹issueʹॻ͘
    - طଘͷissueͰߩݙͰ͖ͦ͏ͳ಺༰Λ୳͢
    ɹeffort/smallɺgood first issue ϥϕϧ͕෇͍͍ͯΔissue͸ൺֱత؆୯
    ɹAWSϦιʔεͷվमͷ৔߹͸ʮ@aws-cdk/aws-xxxʯͷλάΛ୳͢
    Feature Request ͷྫ
    label ݕࡧ݁Ռ

    View Slide

  22. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ઃܭ
    - த~େن໛ͳมߋͷ৔߹͸͋Β͔͡ΊઃܭΛߦ͏
    ɹઃܭΨΠυϥΠϯΛ֬ೝͷ্Ͱissueʹίϝϯτ͢Δ
    ɹˠઃܭࢥ૝͕͋ͬͯͳ͍ͱमਖ਼ͩΒ͚ʹ… ࠷ॳ͸Θ͔Γ΍͍͢issue͔Βணखͷํ͕ྑ͍͔΋
    - ઃܭΨΠυϥΠϯͷ֬ೝ͸༗༻
    CDKશମͷઃܭࢥ૝ʹ͍ͭͯॻ͔Ε͍ͯ·͢ʢগ͠௕͍ʣ
    https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md

    View Slide

  23. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ࣮૷(Magic)
    - ҰൠతͳίʔσΟϯάελΠϧͰ࣮૷
    ɹ2 space indentɺԣ෯120จࣈͳͲৄࡉ͸ΨΠυࢀর
    - ͢΂ͯͷมߋʹ͸୯ମςετ͕ඞཁ
    ɹtest഑Լͷιʔεʹ୯ମ/݁߹ςετΛ௥Ճ͢Δ(JestͰ࣮૷)
    - ίϝϯτ௥Ճ΋৔߹ʹΑͬͯඞཁʢमਖ਼͠ͳ͍ͱLintͰwarningʹͳΔʣ
    ɹ֎෦͔Βݺͼग़͢ࡍͷύϥϝʔλมߋͳͲAPIͷมߋ͸READMEΛߋ৽
    ɹύϥϝʔλ௥ՃͳͲͷ৔߹͸jsdocs΋ߋ৽

    View Slide

  24. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ࣮૷(୯ମςετ)
    • ςετ࣮૷ʹ͸JestΛ࢖༻(Ұ෦ݹ͍΋ͷ͸node-unit)
    - JavaScript/TypeScriptͰ࢖͑ΔςεςΟϯάϑϨʔϜϫʔΫ
    - ଞͷϑϨʔϜϫʔΫ(JUnitͳͲ)Λ࢖ͬͨ͜ͱ͕͋Ε͹෼͔Γ΍͍͢
    • ୯ମςετͷߏ੒
    ɹҎԼͷςετ͕େ൒
    - StackΛੜ੒ͯ͠ɺStackʹConstructΛ࡞੒
    - Stackʹ૝ఆͨ͠Resourceؚ͕·Ε͍ͯΔ͔νΣοΫ

    View Slide

  25. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • StackΛੜ੒ͯ͠ɺStackʹConstructΛ࡞੒
    ࣮૷(୯ମςετ: appsync.test.tsͷ৔߹)
    let stack: cdk.Stack;
    let api: appsync.GraphqlApi;
    beforeEach(() => {
    stack = new cdk.Stack(); // ීஈͷbin഑Լͷ࣮૷ͱಉ༷
    api = new appsync.GraphqlApi(stack, 'api', { // lib഑Լͱಉ༷
    authorizationConfig: {},
    name: 'api',
    schema:
    appsync.Schema.fromAsset(path.join(__dirname,
    'appsync.test.graphql')),
    });
    });

    View Slide

  26. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • ςετ͍ͨ͠ConstructΛ࡞੒
    • Stackʹ૝ఆͨ͠Resourceؚ͕·Ε͍ͯΔ͔νΣοΫ
    ࣮૷(୯ମςετ: appsync.test.tsͷ৔߹)
    test('appsync should configure pipeline … contents’, () => {
    // WHEN
    new appsync.Resolver(stack, 'resolver', {
    api: api,
    typeName: 'test',
    fieldName: 'test2',
    pipelineConfig: ['test', 'test'],
    });
    // THEN
    expect(stack).toHaveResourceLike('AWS::AppSync::Resolver', {
    Kind: 'PIPELINE',
    PipelineConfig: { Functions: ['test', 'test'] },
    });
    });

    View Slide

  27. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • ෳ਺αʔϏεʹލΔมߋ΍CLFΛ࢖ͬͨ৽͍͠ػೳΛ࡞Δ࣌ʹඞཁ
    • ݁߹ςετͷछྨ
    - CloudFormationςϯϓϨʔτΛੜ੒ͯ͠ൺֱ
    cdk synthΛ࣮ߦͯ͠test഑Լͷ *.expected.json ϑΝΠϧͱൺֱ
    - σϓϩΠͯ͠ݕূ
    yarn integ ίϚϯυΛ࣮ߦ͢ΔͱAWSΞΧ΢ϯτʹσϓϩΠʢAWSͷೝূ৘ใઃఆ͸ඞཁʣ
    ࣮૷(݁߹ςετ)

    View Slide

  28. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • λΠτϧ͸ҎԼͷจݴͰ࢝ΊΔ
    feat(module): title
    fix(module): title
    refactor(module): title
    chore(module): title
    • มߋ͕ࣗ໌Ͱͳ͍৔߹͸
    ֬ೝ಺༰Λهࡌ
    • ॏେͳมߋ͕͋Δ৔߹͸هࡌ
    ίϛοτ
    ίϛοτϝοηʔδ࡞੒ͷϕʔε͸ʮConventional Commitsʯ
    https://www.conventionalcommits.org/ja/v1.0.0-beta.4/

    View Slide

  29. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • GitHubͷը໘্ͳͲ͔ΒͰPull RequestΛ࡞੒
    ɹීஈGitHubϑϩʔͳͲͰ։ൃ͍ͯ͠Δ৔߹͸ͦΜͳʹมΘΒͳ͍
    • PRνΣοΫϦετʹैͬͯηϧϑνΣοΫ
    - ୯ମςετ͸௥Ճ͔ͨ͠
    - jsdocs͸ॻ͍͔ͨ
    - README͸దٓߋ৽͔ͨ͠ etc…
    Pull Request࡞੒

    View Slide

  30. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • ϝϯςφ͔ΒϨϏϡʔΛड͚Δ
    ɹPRʹରͯ͠ࢦఠ͕͋Ε͹దٓमਖ਼͢Δ
    ɹૣ͍ͱPR࡞੒ͨ͠౰೔ʹϨϏϡʔ಺༰͕ίϝϯτ͞ΕΔ
    • ιʔεΛमਖ਼ͯ͠Push
    मਖ਼ʹ໰୊͕ͳ͚Ε͹ϝϯςφ͕approve͢Δ
    ※ଞͷमਖ਼͕ฒߦͰ૸͍ͬͯͯςετ͕ίέΔ৔߹΋͋ΔͷͰͦͷࡍ͸मਖ਼͕ඞཁ
    →׬ྃ
    ϨϏϡʔ/Ϛʔδ

    View Slide

  31. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • Linter
    - ESLint
    - pkglint
    - awslint
    - prlint
    • scripts/buildup
    • cfn2ts
    TIPS: ಺෦ͷπʔϧʢҰ෦ൈਮʣ

    View Slide

  32. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • ESLint
    ɹtools಺ͷ eslintrc.js ͷઃఆ͕શମʹ൓өɻGitpodͰ΋ESLint Pluginͷ௥ՃͰܯࠂΛग़ͤΔ
    • pkglint
    ɹtools಺ͷ rules.ts ͷઃఆʹԠͯ͡ɺυΩϡϝϯτܗࣜ ΍ License ͷ੔߹ੑΛݕূ
    • awslint
    ɹaws construct library༻ͷlinterɻઃܭΨΠυϥΠϯʹ४ڌ͍ͯ͠Δ͔Λݕূ
    ɹ(ExperimentalͳύοέʔδͩͱJSDoc͕ͪΌΜͱ෇͍ͯͳͯ͘warn͕ग़ͯΔ͜ͱ΋)
    • prlint(ϕʔλ)
    ɹPRͷ໋໊نଇ΍ίϝϯτʹԠͯ͡ඞཁͳ߲໨͕଍Γ͍ͯΔͷ͔ݕূ
    TIPS: ಺෦ͷπʔϧʢLinterʣ

    View Slide

  33. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • scripts/buildup
    ɹύοέʔδͷσΟϨΫτϦ಺Ͱ࣮ߦ͢Δͱɺؔ࿈͢Δύοέʔδ͚ͩ࠶ϏϧυͰ͖Δ
    ɹॳճϏϧυ͸େମ1࣌ؒ͘Β͍͔͔ͬͯίέΔ͜ͱ͕͋ΔͷͰ࢖͑Δ
    TIPS: ಺෦ͷπʔϧʢscript/buildupʣ
    ࣮ࡍʹॳճىಈͨ͠ࡍͷ݁Ռ

    View Slide

  34. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • CloudFormationϦιʔε͔ΒTSͷίʔυΛੜ੒Ͱ͖Δπʔϧ
    ɹ***.generated.tsϑΝΠϧ͸͜ͷπʔϧͰੜ੒͞Ε͍ͯΔɻ
    ɹL1 ConstructͷରԠ͚ͩ΍͚ʹૣ͍ͷ͸͜ͷπʔϧͷ͓͔͛ʢChatbotͳͲʣ
    • Ϗϧυ࣌ʹ jsonϑΝΠϧ ͔Β TSϑΝΠϧΛੜ੒
    ɹ@aws-cdk/cfnspec ഑ԼʹϏϧυͷࡍੜ੒͞ΕΔ specification.json Λݟ͍ͯΔʁ
    TIPS: ಺෦ͷπʔϧʢcfn2tsʣ

    View Slide

  35. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ࣮ࡍίϯτϦϏϡʔτͨ͠ࡍͷྲྀΕ

    View Slide

  36. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - issueΛ୳͢/ίϝϯτ͢Δ
    - Fork/Gitpodઃఆ
    - ࣮૷
    - ୯ମ/݁߹ςετ࡞੒
    - Branch࡞੒/Push
    ࣮ࡍίϯτϦϏϡʔτͨ͠ࡍͷྲྀΕ
    - Pull Request࡞੒
    - ϨϏϡʔ/मਖ਼
    - ϝϯςφ͕Ϛʔδ
    ※͋͘·Ͱࢀߟ
    ɹ͜ͷ௨ΓͰͳͯ͘΋େৎ෉Ͱ͢

    View Slide

  37. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - issueΛ୳͢
    issueΛ୳͢/ίϝϯτ͢Δ
    - issueʹίϝϯτ͢Δ

    View Slide

  38. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - ϦϙδτϦ͔ΒFork͢Δ
    - Forkͨ͠ϦϙδτϦͰGitpodΛىಈ
    Fork/Gitpodઃఆ

    View Slide

  39. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ࣮૷
    - Gitpod্ͰιʔεΛ֬ೝ࣮ͯ͠૷

    View Slide

  40. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ୯ମ/݁߹ςετ
    - package.jsonΛ֬ೝͯ͠ςετʢ yarn build+test ͷ࣮ߦ݁Ռ ʣ
    ɹಈ࡞͕Θ͔Βͳ͍࣌͸ɺҙਤతʹςετΛյͯ͠ӨڹൣғΛ֬ೝ
    - ݸਓ༻ͷAWS؀ڥͰಈ࡞֬ೝ

    View Slide

  41. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - Gitpod্ͰBrunch࡞੒ͯ͠commitͯ͠Push
    ɹGitΛ࢖༻ͨ͠ීஈͷ։ൃͱಛʹมΘΒͳ͍Ͱ͢ʢ Gitpodͷݖݶ͚ͩ͸஫ҙʂ ʣ
    Brunch࡞੒/Push

    View Slide

  42. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - GitHub্ͰPull RequestΛ࡞੒
    Pull Request࡞੒

    View Slide

  43. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - ҎԼͷݪҼͰϦδΣΫτ
    ɹ1ίϛοτͰPR࡞੒ɺػೳ௥ՃͳͷʹREADMEมߋͳ͠
    mergify bot ͷlintͰ஄͔ΕΔ

    View Slide

  44. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - ΤϥʔͷݪҼΛमਖ਼ͯ͠࠶౓Push͢Ε͹׬ྃ
    merging bot ͷlintͳͲͰ஄͔ΕΔ

    View Slide

  45. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - ϝϯςφͷํ͔Βࢦఠ͕དྷΔͷͰमਖ਼
    ϨϏϡʔ/मਖ਼

    View Slide

  46. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    - ϝϯςφͷํ1ਓҎ্͔Βapprove͞ΕΕ͹Ϛʔδ
    ϝϯςφ͕Ϛʔδ


    View Slide

  47. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    ·ͱΊ

    View Slide

  48. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    • AWS CDKͷߏ੒ͱৄࡉΛ঺հ
    ɹCDK͸AWSʹཹ·Βͣൃల͢ΔՄೳੑ͕͋Δʂ ৐Δ͔͠ͳ͍ɺ͜ͷϏοά΢Σʔϒʹʂ
    • ίϯτϦϏϡʔςΟϯάΨΠυͷઆ໌
    ɹ΍Γํ͸ίϯτϦϏϡʔςΟϯάΨΠυʹશͯॻ͍ͯ͋Δɻಡ΋͏ʂ
    • ࣮ࡍίϯτϦϏϡʔτͨ͠ࡍͷྲྀΕͷ঺հ
    ɹࣦഊͨ͠಺༰΋ؚΊͯίϯτϦϏϡʔτ·Ͱͷશମ૾Λ঺հ
    →໌೔͔Β͋ͳͨ΋AWS CDKͷίϯτϦϏϡʔλʔʹͳΖ͏ʂʂʂ
    ·ͱΊ

    View Slide

  49. Thank you!
    © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    In Partnership with
    Tomoki Sato
    [email protected]

    View Slide