Azure Pipeline

011714704c4a925e542d426d4cdaa4e3?s=47 giginet
April 16, 2019

Azure Pipeline

011714704c4a925e542d426d4cdaa4e3?s=128

giginet

April 16, 2019
Tweet

Transcript

  1. Azure Pipelines for iOS @giginet iOS Test Nights #10 1

  2. ୭ • @giginet • ΫοΫύου ϞόΠϧج൫ • Core Contributor of

    Carthage / fastlane 2
  3. ࠓ೔࿩͢͜ͱ • Azure Pipelines࢖ͬͯΈͨ࿩ • ओʹOSS༻్ 3

  4. Azure Pipelinesͱ͸ • Microso(͕ఏڙ͢ΔCI as a service • ڈ೥ͷळ͙Β͍ʹ࢝·ͬͨ •

    h0ps:/ /azure.microso(.com/ja-jp/services/devops/pipelines/ 4
  5. 5

  6. ಛ௃ • GUIͰઃఆՄೳ • ͔ͳΓແྉͰ࢖͑Δ • OSS͸࣌ؒແ੍ݶͰ10ฒྻɻ࣮࣭ແྉ • Ϋϩʔζυ͸1ฒྻͷΈͰ݄1800෼ •

    ๛෋ͳλεΫ • Market Place • macOS/Linux/Windowsͷίϯςφ͕࢖͑Δ • ηϧϑϗεςΟϯά͕Մೳ 6
  7. 7

  8. Demo 8

  9. 9

  10. 10

  11. 11

  12. • ઃఆϑΝΠϧ͸YAMLͰ΋ఆٛՄೳ • azure-pipelines.yml pool: vmImage: 'macOS 10.13' steps: -

    task: Xcode@5 inputs: scheme: '' sdk: 'iphoneos' configuration: 'Release' xcodeVersion: 'default' 12
  13. • δϣϒఆ͔ٛΒYAMLΛੜ੒Ͱ͖Δ 13

  14. ͦͷଞiOS޲͚ͷTask • Install Provisioning Profile / Cer3ficates • App Store

    • αϒϛοτ • TestFlight • Test with App Center 14
  15. Install Provisioning Profile / Cer2ficates • Provisioning Profile΍ূ໌ॻΛΞοϓϩʔυͯ͠ΠϯετʔϧͰ ͖Δ •

    Developer Center͔Βऔ͖ͬͯͨΓɺࣗಈͰߋ৽ͨ͠Γ͸ͯ͠ ͘Εͳ͍ • ͦ͜·Ͱ΍Δʹ͸fastlaneΛ࢖͏ 15
  16. App Store • App Store΁ͷαϒϛοτ͕ߦ͑Δ • ಺෦తʹ͸fastlaneୟ͍ͯΔ • ҰԠΦʔϓϯιʔε h0ps:/

    /github.com/Microso;/app-store-vsts- extension/tree/master/Tasks/app-store-release • ݱঢ়Ͱ͖Δ͜ͱ͕ݶఆత͗ͯ͢ݫ͍͠…… • ·ͱ΋ʹ࢖͏ͷ͸೉͍͠ͷͰ͸ɻ௚઀fastlane࢖ͬͨํ͕ྑ͍ 16
  17. 17

  18. UI Test • Visual Studio App CenterΛ࢖ͬͨUIςετ͕Մೳ • XCUITest/Appium/EarlgreyͳͲ •

    ͪΌΜͱ࢖ͬͯͳ͍ͷͰෆ໌ 18
  19. Swi$PM • 1ͭͷδϣϒͰmacOS/Linux͕࢖͑Δ • →ΫϩεϓϥοτϑΥʔϜͳSwi0ϥΠϒϥϦʹ࢖͑Δ͔΋ʁ • Swi0PMͰఏڙ͍ͯ͠ΔϥΠϒϥϦͷϏϧυʹ࢖ͬͯΈͨ 19

  20. Swi$PM • Swi% ToolchainΛѻ͏Task͕Ұ੾ແ͍ • swi%env΍ToolchainͷΠϯετʔϧΛશͯࣗલͰ΍Δඞཁ͕ ͋Δ • ͜ͷ༻్Ͱ͸ݱঢ়Travis CIͷํ͕ྑ͍

    20
  21. jobs: - job: macOS pool: vmImage: 'macOS-10.13' steps: - script:

    | export SWIFT_VERSION=4.2.4 # Install swiftenv eval "$(curl -sL \ https://gist.githubusercontent.com/kylef/ \ 5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/\ swiftenv-install.sh)" swift build 21
  22. Pros • ୯७ʹXcodeͰϏϧυ͢ΔϓϩδΣΫτ • xcodebuild Λࣗ෼Ͱୟ͔ͳͯ͘ྑ͍ • খ͞ͳϓϥΠϕʔτϓϩδΣΫτ޲͖ • ϥΠϒϥϦʹ΋ΞϓϦʹ΋࢖͑Δ

    22
  23. Pros • δϣϒఆٛͷॊೈ͞ • GUIͰઃఆͰ͖ͯࢼߦࡨޡ͠΍͍͢ • ઃఆཤྺ΋࢒Δ • YAMLͰѻ͏͜ͱ΋Ͱ͖Δ •

    GUI͔ΒYAML͕ు͚Δ 23
  24. Cons • ܕʹϋϚͬͯͳ͍ϓϩδΣΫτʹෆ޲͖ • ྫ͑͹Swi%PMͰ഑෍͢ΔϥΠϒϥϦͳͲ • Ωϟογϡͷ࢓૊Έ͕ශऑ • ύοέʔδΠϯετʔϧͳͲ͕ඞཁͳϓϩδΣΫτʹෆ޲͖ •

    ؀ڥߏங͕DockerΛ࢖͏͜ͱલఏͱͳ͍ͬͯΔͨΊɺmacOS ͩͱ೉͍͠ 24
  25. Cons • azure-pipelines.yml͕೉͍͠ • ֤λεΫͷΦϓγϣϯͳͲΛ೺Ѳ͠ͳ͍ͱ͍͚ͳ͍ͷͰGUI Ͱ΍Δ͔ɺશ෦γΣϧεΫϦϓτͰ΍ͬͨํ͕ྑ͍ҹ৅…… • ༗ྉϓϥϯߴ͍ؾ͕͢Δ • େ͖ͳΞϓϦ͸BitriseΛ࢖ͬͨํ͕ྑ͍ͷͰ͸……

    25
  26. ·ͱΊ • ϓϥΠϕʔτϦϙδτϦ΋࣮࣭ແྉͰྑ͍ • ܕʹϋϚͬͨ͜ͱ͸΍Γ΍ͦ͢͏ • Taskʹ͋Δ͜ͱΛ͢Δʹ͸ָ͕ͩɺͪΐͬͱ֎Εͨ͜ͱΛ͠Α͏ͱ͢Δͱ్୺ʹ ೉͍͠ • ৄ͍͠ਓ͸Travis

    CIͷํ͕Ή͠Ζָ • iOSͷCD༻్ʹ͸·ͩ·ͩΩπͦ͏ • App Store extensionͰͰ͖Δ͜ͱ͕ݶఆత 26
  27. ࢀߟࢿྉ • h#ps:/ /docs.microso/.com/en-us/azure/devops/pipelines/ languages/xcode?view=azure-devops • h#ps:/ /github.com/Microso/Docs/pipelines-xcode 27

  28. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 28