LoginSignup
13
6

More than 3 years have passed since last update.

CircleCI 2.1 の job をローカルの CLI で実行する

Last updated at Posted at 2019-07-18

CircleCI の CLI はまだ 2.1 に対応していないようで、実行しようとするとエラーが発生する(Ver0.1.5725+b0a23c0)。

$ circleci local execute
Error: 
You attempted to run a local build with version '2.1' of configuration.
Local builds do not support that version at this time.
You can use 'circleci config process' to pre-process your config into a version that local builds can run (see 'circleci help config process' for more information)

回避策として

  • circleci config process コマンドで config.yml を CircleCI 2.1 形式から 2.0 形式に変換
    • このコマンドは config.yml をバリデーションしつつ同時に executorsorbs などを展開して出力してくれる
  • 変換後のファイルを使って job を実行

すればよい。

$ circleci config process .circleci/config.yml > process.yml
$ circleci local execute -c process.yml

ref: CircleCI のローカル CLI の使用 - CircleCI

13
6
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
13
6