LoginSignup
1
0

More than 3 years have passed since last update.

解決方法:CircleCI Orbs が registry に存在せずビルドエラーになる

Last updated at Posted at 2019-06-18

問題

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.

ビルド結果

スクリーンショット

circleci-build_error.png

エラーメッセージ

# 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 を検索する。

 CircleCI Orb Registry
 circleci-build_error(1).png

2. config.yml の orbs(バージョン) を修正

検索結果に表示された orbs(バージョン) に書き換える

.circleci/config.yml
# 省略
orbs:
  heroku: circleci/heroku@0.0.8
# 省略

3. ビルドが成功することを確認

.circleci/config.ymlをコミット & git push して CircleCI のビルドが成功することを確認する。

circleci-build_error(2).png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0