Jenkinsおじさんと楽しい連携ツールたち

Ee92a1618b3853c52168612a0cbe47cb?s=47 toshihirock
January 10, 2015

 Jenkinsおじさんと楽しい連携ツールたち

Jenkinsユーザーカンファレンス2015東京LT

Ee92a1618b3853c52168612a0cbe47cb?s=128

toshihirock

January 10, 2015
Tweet

Transcript

  1. Jenkins͓͡͞Μͱָ͍͠࿈ ܞπʔϧͨͪ  +FOLJOTϢʔβʔΧϯϑΝϨϯε౦ژ !UPTIJIJSPDL

  2. ࣗݾ঺հ ɾ@toshihirock ɾ͓٬༷ઌʹͯAndroid։ൃͷ͓ख఻͍(ओʹ ։ൃ؀ڥվળ)Λ͍ͯ͠Δ ɾ޷͖ͳϙουΩϟετ͸ʮRebuildʯͱ ʮϥΠϜελʔӉଟؙͷ΢ΟʔΫΤϯυγϟο ϑϧʯ

  3. ࿩͢͜ͱ

  4. ❤️ loves

  5. ❤️

  6. Slack ɾνϟοτΞϓϦ ɾJenkinsͷϏϧυ݁Ռͷ௨஌Λߦ͏ ɾJenkins Slack pluginΛར༻ͯ͠࿈ܞ

  7. ͜Μͳײ͡Ͱදࣔ͞ΕΔ

  8. Կ͔͞Έ͍ͬͯ͠ݴΘΕͨ

  9. ίʔυม͑ͯΈͨ

  10. EmojiͰ࿨Μͩ

  11. ❤️

  12. Gitlab ɾGitHubͷΫϩʔϯɻCommunityEdition͸ແྉͰ࢖͑ Δ ɾ࣮ࡍʹར༻ͯ͠൒೥΄Ͳܦա͍ͯ͠Δ͕΄΅໰୊ͳ ͘࢖͍͑ͯΔ ɾMergeRequest(PullRequestͱ΄΅ಉ͡)Ͱ࣮ࡍʹ MasterʹϚʔδ͢ΔલʹϏϧυɺ੩తղੳɺςετΛ ߦ͏ ɾGitlab Merge

    Request Builder PluginΛར༻ͯ͠࿈ܞ
  13. Gitlab-MergeRequest݁Ռ

  14. ❤️

  15. deploygate ɾiOS/AndoridΞϓϦͷςετ൛ΞϓϦͷ഑৴͕ ग़དྷΔ ɾΞϓϦʹରͯ͠೚ҙͷϝοηʔδΛ෇༩Ͱ͖Δ ɾgradle-deploygate-pluginΛར༻ͯ͠࿈ܞ (ProxyରԠͯ͠ͳ͔ͬͨͷͰϓϧϦΫͯ͠Ϛʔδ ͯ͠΋Βͬͨ)

  16. GradleΛ࢖ͬͯΞϓϦʹରͯ͠Ϗ ϧυ൪߸ ͱίϛοτ৘ใΛ௥Ճ

  17. Ϗϧυ൪߸ ί ϛοτϝοηʔδ

  18. ࠷େݸͷ όʔδϣϯΛ؅ཧ

  19. build.grade ʢ https://gist.github.com/toshihirock/ f4a0c96bc4809152d990ʣ

  20. import groovy.json.* ext { jenkinsUrl = 'http://localhost:8080' buildNumber = System.getenv("BUILD_NUMBER");

    jobName = System.getenv("JOB_NAME"); println "build number is ${buildNumber}" println "jobName is ${jobName}" } def getJson(url) { println "start getJson $url" def response = new URL(url).text return new JsonSlurper().parseText(response) } def getJenkinsMessage(msg) { def url = "${jenkinsUrl}/job/${jobName}/${buildNumber}/api/json" def items = getJson(url)['changeSet']['items'] items.eachWithIndex() { obj, i -> msg += obj['msg'] + ' ' } return msg }
  21. deploygate { userName = ownerName token = myToken apks {

    example { sourceFile = file(“build/outputs/apk/hoge.apk") //Below is optional if(buildNumber != null) { String msg = "B${buildNumber} " message = getJenkinsMessage(msg) } } } }
  22. ·ͱΊ ɾJenkins͓͡͞Μ͸୯ಠͰ΋ศར͚ͩͲଞ ͷ࿈ܞπʔϧͱ૊Έ߹ΘͤΔͱศར ɾͨͩ࢖͏͚ͩͰͳͯ͘ͻͱ޻෉͢Δͱ΋ͬ ͱศར ɾϙουΩϟετࠓ೥΋ฉ͖͍ͨ