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

Our favorite Dependency updates has been deprived

tt
November 02, 2018

Our favorite Dependency updates has been deprived

An introduction of Automated Dependency Updates with Renovate App

tt

November 02, 2018
Tweet

More Decks by tt

Other Decks in Programming

Transcript

  1. First of all, npm’s documentation recommends that you use SemVer

    • major → ϝδϟʔόʔδϣϯ͸1 • minor → ϚΠφʔόʔδϣϯ͸5 • patch → ύονόʔδϣϯ͸4 e.g. ^1.5.4 1.5.4Ҏ্2.0ະຬ
  2. How to update npm packages ? Search for updates on

    your own ? npm outdated ? yarn outdated ? yarn upgrade-interactive ? npx npm-check ?
  3. How to update npm packages with apps ? ci-yarn-upgrade ?

    green-keeper ? greenkeeper-keeper ? hothouse ?
  4. Automated Dependency Updates Save time and reduce risk by automating

    dependency updates in software projects. Fully customizable with a setting to suit every workflow.
  5. Language Supports • WORKSPACE Bazel • travis.yml Travis • Dockerfile

    / docker-compose.yml Docker • go.mod Golang • package.json npm/yarn • requirements.txt Python/PIP • composer.json PHP
  6. Language Supports • JavaScript • package.json Λ΋ͱʹόʔδϣϯΛ֬ೝ • Node.js Versions

    • package.jsonͷengines • nvm.rcͷόʔδϣϯ • travis.ymlͷnode_js
  7. Our conventional updating work 1 • ߋ৽ϒϥϯνΛ੾ͬͯPush • PR࡞੒ •

    GitHub web hook Ͱ CI࿈ܞͤͯ͞ςετ • ςετ݁ՌΛ֬ೝͯ͠໰୊ͳ͚Ε͹Ϛʔδ
  8. Our conventional updating work 2 • ࣗಈͰߋ৽ϒϥϯνΛ੾ͬͯPush • ࣗಈͰPR࡞੒ •

    GitHub web hook Ͱ CI࿈ܞͤͯ͞ςετ • ςετ݁ՌΛ֬ೝͯ͠໰୊ͳ͚Ε͹Ϛʔδ
  9. Our updating work … ? • ࣗಈͰߋ৽ϒϥϯνΛ੾ͬͯPush • ࣗಈͰPR࡞੒ •

    GitHub web hook Ͱ CI࿈ܞͤͯ͞ςετ • ࣗಈͰςετ݁Ռ(PR or branchͷstatus)Λ֬ೝ͠ ͯ໰୊ͳ͚Ε͹Ϛʔδ
  10. Basic custom config { "extends": [ “config:base”, “:preserveSemverRanges" ], "timezone":

    "Asia/Tokyo", "schedule": "before 4am", "automerge": true, "major": { "automerge": false }, "packageRules": [ { "updateTypes": [ "major" ], "labels": [ "UPDATE-MAJOR" ] } ] }
  11. Finally … • ྨࣅΞϓϦͷதͰ͸಄ͻͱͭൈ͖ग़͍ͯΔ • Auto merge ʹରͯ͠৺ཧత҆શͷ֬อͷͨΊʹςετ Λ͔ͬ͠Γॻ͍͓ͯ͘ͱ •

    unit_test, End to End, visual regression… • configϑΝΠϧͷઃఆɺςετམͪͨͱ͖͸ਓؒͷ֬ೝ ͱ͍ͬͨ࡞ۀ͸͋Δ
  12. thx