1

アプリケーションのデモ ブランチを作成しようとしています。このブランチでは、サプライヤがログインしてその機能について詳しく知ることができます。

Heroku の本番環境にデプロイするマスター ブランチがあります。さらに、Heroku ステージング環境にデプロイするステージング ブランチがあります。Github アプリで、ステージング ブランチから「demo」というブランチを作成しました。

CircleCI を使用してデプロイすると、次のエラーが表示されます。

unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.

git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master returned exit code 1

error: failed to push some refs to 'git@heroku.com:foobar-demo.git' Action failed: git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master

私の circle.yml は次のようになります。

deployment:
  staging:
    branch: staging
    commands:
      - heroku maintenance:on --app foobar-staging
      #- heroku scale worker=0 --app foobar-staging
      - git push git@heroku.com:foobar-staging.git $CIRCLE_SHA1:master
      - heroku run rake db:migrate --app foobar-staging
      #- heroku scale worker=x --app foobar-staging
      - heroku maintenance:off --app foobar-staging

  demo:
    branch: demo
    commands:
      - heroku maintenance:on --app foobar-demo
      #- heroku scale worker=0 --app foobar-demo
      - git push git@heroku.com:lfoobar-demo.git $CIRCLE_SHA1:master
      - heroku run rake db:migrate --app foobar-demo
      #- heroku scale worker=x --app foobar-demo
      - heroku maintenance:off --app foobar-demo

ステージングへのデプロイ フローは正常に機能しています。唯一の問題は、新しいデモ ブランチにあります。ブランチと Heroku アプリ (foobar-demo.herokuapp.com) を削除しようとしましたが、うまくいきませんでした。

4

1 に答える 1

5

このSO スレッドで受け入れられた回答で解決策を見つけました。

circle.yml ファイルに変更$CIRCLE_SHA1:masterする必要がありました。$CIRCLE_SHA1:refs/heads/master

于 2015-05-11T19:44:36.040 に答える