問題
CircleCIの公式ドキュメントを参考に用意した.circleci/config.yml
でビルドエラーになった。
参考にしたconfig.yml
参照元:Configuring Deploys - CircleCI
Configuring Deploys > Heroku > Customizing Heroku Workflows
.circleci/config.yml
version: 2.1
orbs:
heroku: circleci/heroku@1.0.0
workflows:
heroku_deploy:
jobs:
- deploy
jobs:
deploy:
executor: heroku/default # Uses the basic buildpack-deps image, which has the prerequisites for installing heroku's CLI.
steps:
- checkout
- heroku/install # Runs the heroku install command, if necessary.
- heroku/deploy-via-git: # Deploys branch to Heroku via git push.
only-branch: master # If you specify an only-branch, the deploy will not occur for any other branch.
ビルド結果
スクリーンショット
エラーメッセージ
# Config Processing Error (Don't rerun)
$ #!/bin/sh -eo pipefail
# Cannot find circleci/heroku@1.0.0 in the orb registry. Check that the namespace, orb name and version are correct.
#
# -------
# Warning: This configuration was auto-generated to show you the message above.
# Don't rerun this job. Rerunning will have no effect.
false
Exited with code 1
原因
レジストリに存在しない CircleCI orbs を利用していた。
備考
公式ドキュメントで orbs にcircleci/heroku@1.0.0
が指定されていたが、1.0.0
は registryに(まだ)存在しないバージョンだった。
.circleci/config.yml
# 省略
orbs:
heroku: circleci/heroku@1.0.0
# 省略
解決方法
1. 利用可能な CircleCI orbs を検索
Explore Orbs ページで registry 上の Orbs を検索する。
2. config.yml
の orbs(バージョン) を修正
検索結果に表示された orbs(バージョン) に書き換える
.circleci/config.yml
# 省略
orbs:
heroku: circleci/heroku@0.0.8
# 省略
3. ビルドが成功することを確認
.circleci/config.yml
をコミット & git push
して CircleCI のビルドが成功することを確認する。