未找到带有bitbucket-pipelines.yml-git命令的Heroku PHP
我花了几个小时才找到这个,但解决方案对我没有帮助 我的设置未找到带有bitbucket-pipelines.yml-git命令的Heroku PHP,git,heroku,laravel-5,bitbucket,bitbucket-pipelines,Git,Heroku,Laravel 5,Bitbucket,Bitbucket Pipelines,我花了几个小时才找到这个,但解决方案对我没有帮助 我的设置 带有phpinfo视图的Laravel PHP信息应用程序,无额外功能 具有Heroku管道的Bitbucket云 Heroku应用程序已相应配置 问题是,当我将更改推送到Bitbucket,然后将更改推送到Heroku,找不到git命令 请参见链接到中的mybitbucket pipelines.yml 当管道步骤“DeploytoHeroku”运行时,它将中止 + git push https://heroku:$HEROKU
- 带有phpinfo视图的Laravel PHP信息应用程序,无额外功能
- 具有Heroku管道的Bitbucket云
- Heroku应用程序已相应配置
bitbucket pipelines.yml
当管道步骤“DeploytoHeroku”运行时,它将中止
+ git push
https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
bash: git: command not found
在构建设置中,git的安装成功完成。看
为什么git命令随后会失败
提前谢谢 失败的原因是,在第二步中没有安装git组件 请在下面找到正确的版本
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.3
pipelines:
default:
- step:
name: Set up the docker container
caches:
- composer
script:
- apt-get update && apt-get install -y unzip git git-core libc-client-dev libkrb5-dev
&& rm -r /var/lib/apt/lists/*
- docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-
install -j$(nproc) imap
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
-- filename=composer
- composer install
- vendor/bin/phpunit
- step:
# set HEROKU_API_KEY and HEROKU_APP_NAME environment variables
# set clone `depth: full' as described here: https://confluence.atlassian.com/x/Y9-
5Mw
name: Deploy to Heroku
deployment: test # set to test, staging or production
# trigger: manual # uncomment to have a manual step
- apt-get update && apt-get install -y unzip git git-core libc-client-dev libkrb5-
dev && rm -r /var/lib/apt/lists/*
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD