オンプレミスJenkinsをやっと葬り去った話 / jenkins_kill

オンプレミスJenkinsをやっと葬り去った話 / jenkins_kill

6f36ff3943be908c5d2259f4aef09ea6?s=128

Jun Watanabe

April 21, 2016
Tweet

Transcript

  1. ΦϯϓϨϛεJenkins Λ΍ͬͱ૴Γڈͬͨ࿩ 2016/04/21 PHPBLT#4 Jun Watanabe

  2. Jun Watanabe @rela1470 • ΃ͪͺʔ6೥໨ • ORATTA, Inc Chief Engineer

    • http://rela.red/
  3. ݁࿦

  4. JenkinsΛcircleciʹ͠·ͨ͠!

  5. ͛͢ʔΑ͘ฉ͘࿩

  6. ৭ʑͭ·͍ͮͨΓ ؤுͬͨͷͰ ۪ஒΒ͍ͤͯͩ͘͞

  7. ෩࿊෦(ࣾ಺੍౓) िʹ3࣌ؒձٞࣨʹ࿜ͬͯ ͻͨ͢Βۀ຿վળɾٕज़ௐࠪ ORATTA Frontier TechͷଏশΒ͍͠

  8. ࠓ೥2݄͔Β CIվળΛ ΍ͬͯ·ͨ͠

  9. ͍··Ͱͷվળ

  10. ͓ͬ͞Μͷإ͕ݏ

  11. ঁମԽͰ ղܾ ࣗࣾͷσβΠφʔ͞Μʹॻ͍ͯ΋Β͍·ͨ͠ʘ(^o^)ʗ

  12. σβΠϯ͕ ݹष͍

  13. http://aarjithn.github.io/jenkins-neo-theme/

  14. ͦΕͰ΋ཷ·Δ Jenkinsͷ໰୊఺

  15. ҡ࣋͢ΔͨΊͷ ίετ͕ߴ͍

  16. खಈͰͷόʔδϣϯΞοϓ

  17. ϓϥάΠϯ45ݸ

  18. PHP΍PEARͷ ϓϩμΫτࠩ෼

  19. circleciಋೖͰ Ͳ͏΍ͬͯղܾ͔ͨ͠

  20. PEAR໰୊

  21. Composerಋೖ

  22. άάΔͱग़ͯ͘Δ΍ͭ { "require": { "pear-pear.php.net/PEAR" : "*", "pear-pear.php.net/log" : "*",

    "pear-pear.php.net/http_request2" : "*" }, "repositories": [ { "type": "pear", "url": "http://pear.php.net" } ] }
  23. 2016/03/03

  24. 2016/03/10

  25. ಈ͔ͳ͘ ͳͬͯͨ…

  26. 2016/3/4 ϦϦʔε composer 1.0.0-beta1 ࢓༷มߋ http௨৴NG͕ σϑΥϧτઃఆʹ

  27. Composerා͍

  28. ౰࣌͸ղܾࡦ͕ Θ͔Βͳ͔ͬͨ

  29. ͖ͬ͞QiitaͰݟ͚ͭ·ͨ͠ http://qiita.com/shinkuFencer/items/00c6cdbc0d0e0e081e38

  30. httpΛڐͯ͠΋Β͏ { "config": { "secure-http": false }, "require": { "pear-pear.php.net/PEAR"

    : "*", "pear-pear.php.net/log" : "*", "pear-pear.php.net/http_request2" : "*" }, "repositories": [ { "type": "pear", "url": "http://pear.php.net" } ] }
  31. ࠓճ͸Ͳ͏͔ͨ͠

  32. Packagist

  33. Packagistʹ͋Δ΍ͭΛ࢖͏ { "require": { "pear/pear": "dev-master", "pear/log": "*@stable", "pear/http_request2": "v2.3.0"

    }, "require-dev": { "phpunit/phpunit": "4.8.23", } }
  34. Θ͟Θ͟ΦϓγϣϯͰηΩϡ ϦςΟऑΊͳͯ͘ྑ͍ ΠϚυΩͬΆ͍

  35. PackagistͰ ࣮૷ͯ͠ ྑ͔ͬͨ

  36. ྑ͔ͬͨ…

  37. PHPͷόʔδϣϯ

  38. 7.0.4 / 7.0.0RC7 / 5.6.14 / 5.6.5 / 5.6.2 /

    5.5.21 / 5.5.16 / 5.5.15 / 5.5.11 / 5.5.9 / 5.5.8 / 5.5.7 / 5.5.3 / 5.5.2 / 5.5.0 / 5.4.37 / 5.4.21 / 5.4.19 / 5.4.18 / 5.4.15 / 5.4.14 / 5.4.13 / 5.4.12 / 5.4.11 / 5.4.10 / 5.4.9 / 5.4.8 / 5.4.7 / 5.4.6 / 5.4.5 / 5.4.4 / 5.3.25 / 5.3.20 / 5.3.10 / 5.3.3
  39. circle.ymlͰόʔδϣϯࢦఆ machine: php: version: 5.5.21

  40. gitͷ഑ஔ

  41. 1ϓϩδΣΫτ 5ͭ͘Β͍ͷgitʹ ෼͔Ε͍ͯΔ

  42. ϓϩδΣΫτͷgit഑ஔྫ multi [multi.git] //ࣗࣾϑϨʔϜϫʔΫ !system ɹ"addon ɹ#ɹ!asuka [asuka.git] //ϓϩδΣΫτຖͷಠ࣮ࣗ૷ιʔε ɹ#ɹɹ"master

    [asuka-master.git]ɹ//ΞΠςϜ౳ͷϚελʔઃఆ ɹ#ɹɹ!web [asuka-web.git]ɹ//ը૾΍Ի੠౳ ɹ!lib[lib.git] //ࣗࣾϥΠϒϥϦ
  43. αϒϞδϡʔϧԽ ͨ͠

  44. αϒϞδϡʔϧԽ ͔ͨͬͨ͠

  45. ෺ཧͰԥͬͨ (circle.yml)

  46. git cloneͯ͠ ࣗ෼Ͱ഑ஔ͠ͳ͓͢ checkout: post: - "mkdir -p /tmp/yaml" -

    "git clone -b ${CIRCLE_BRANCH} git@github.com:oratta-inc/multi.git / home/ubuntu/multi" - "git clone -b ${CIRCLE_BRANCH} git@github.com:oratta-inc/lib.git /home/ ubuntu/multi/system/lib" - "mkdir /home/ubuntu/multi/system/addon" test: pre: - "cp -a /home/ubuntu/${CIRCLE_PROJECT_REPONAME}/ /home/ubuntu/multi/ system/addon/${CIRCLE_PROJECT_REPONAME}” - "git clone -b ${CIRCLE_BRANCH} git@github.com:oratta-inc/asuka- master.git /home/ubuntu/multi/system/addon/asuka/master” override: - "phpunit -c /home/ubuntu/multi/system/addon/${CIRCLE_PROJECT_REPONAME}/ phpunit.xml -d memory_limit=512M"
  47. ຖճ1͔Β git clone

  48. None
  49. 13ඵ͘Β͍

  50. GitHub͸ҙ֎ͱૣ͍

  51. ΩϟογϡʹೖΕͯ ϦετΞΛࢼͨ͠Β ٯʹ஗͘ͳͬͨ

  52. ϏϧυνΣΠϯ

  53. ϓϩδΣΫτͷgit഑ஔྫ multi [multi.git] //ࣗࣾϑϨʔϜϫʔΫ !system ɹ"addon ɹ#ɹ!asuka [asuka.git] //ϓϩδΣΫτຖͷಠ࣮ࣗ૷ιʔε ɹ#ɹɹ"master

    [asuka-master.git]ɹ//ΞΠςϜ౳ͷϚελʔઃఆ ɹ#ɹɹ!web [asuka-web.git]ɹ//ը૾΍Ի੠౳ ɹ!lib[lib.git] //ࣗࣾϥΠϒϥϦ
  54. ্ҐͷGit͕ߋ৽͞Εͨ৔߹ શϓϩδΣΫτͷςετΛ ૸Β͍ͤͨ

  55. ෺ཧͰԥͬͨ (circle.yml)

  56. ςετʹ੒ޭͨ͠Β ؔ࿈͢ΔϓϩδΣΫτΛAPIܦ༝Ͱ࣮ߦ deployment: develop: branch: develop commands: - curl -X

    POST https://circleci.com/api/v1/project/oratta-inc/rave/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/chloris/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/dark/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/bleach/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/asuka/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/sengoku/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN - curl -X POST https://circleci.com/api/v1/project/oratta-inc/aqua/ tree/develop?circle-token=$CHAIN_PROJECT_TOKEN
  57. None
  58. ແྉϓϥϯͩͱ 1ίϯςφͷΈ

  59. ஗͍

  60. ۚͰԥΔ?

  61. Slack࿈ܞ

  62. PHPͰಠ࣮ࣗ૷

  63. σϑΥϧτͰ࿈ܞػೳ͋Γ

  64. ෭࢈෺

  65. composerಋೖͰ ϩʔΧϧ؀ڥ͕౷Ұग़དྷͨ

  66. PhpStormͰΧόϨοδͱ͔

  67. ·ͱΊ

  68. ϨΨγʔγεςϜͰ΋ ෺ཧ(circle.yml)Ͱ ͳΜͱ͔ͳΔ

  69. Composerා͍