blog.unresolved.xyz

CircleCIでyarn upgradeとかbundle updateをやってプルリクを作ってもらう

Wed Jul 25 2018

    ほんとにライフチェンジングなのでやってない人はぜひやってみてほしい。

    有志が以下のような素晴らしいツールを公開してくれているので、これらをありがたく使わせてもらう!

    CircleCIで依存ライブラリのアップデートを回す

    僕はこんなconfig.ymlを使っている。

    1version: 2 2jobs: 3 build: 4 # your default build scripts. 5 bundle-update: 6 docker: 7 - image: circleci/ruby:2.5.1-node 8 steps: 9 - checkout 10 - restore_cache: 11 name: Restore bundler cache 12 key: rails-demo-{{ checksum "Gemfile.lock" }} 13 - run: 14 name: Setup requirements for continuous bundle update 15 command: gem install -N circleci-bundle-update-pr 16 - deploy: 17 name: Continuous bundle update 18 command: circleci-bundle-update-pr $GIT_USER_NAME $GIT_USER_EMAIL 19 20 yarn-upgrade: 21 docker: 22 - image: node:6-alpine 23 steps: 24 - run: apk add --update --no-cache git openssh-client 25 - checkout 26 - run: yarn global add ci-yarn-upgrade 27 - run: yarn install 28 - run: ci-yarn-upgrade --execute --verbose --latest; 29 30workflows: 31 version: 2 32 build_and_test: 33 jobs: 34 - build 35 nightly-bundle-update: 36 triggers: 37 - schedule: 38 cron: "0 0 * * *" 39 filters: 40 branches: 41 only: master 42 jobs: 43 - bundle-update 44 nightly-yarn-upgrade: 45 triggers: 46 - schedule: 47 cron: "0 0 * * *" 48 filters: 49 branches: 50 only: master 51 jobs: 52 - yarn-upgrade

    CircleCI上のcronはUTCで回るので、日本だとAM9時に処理がされる。

    サービスにやらせるならこれ

    たぶん王道はこの辺なのかなー。

    どちらもセルフホスティングできるはずなので、お金払いたくないなら自分でたてちゃえば済むと思う。