我正在尝试使用bitbucket管道部署PHP项目。使用此代码:
init: # -- First time init
- step:
name: build
image: php:7.1.1
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- vendor/bin/phpunit
artifacts: # defining vendor/ as an artifact
- vendor/**
- step:
image: samueldebruyn/debian-git
name: deployment
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp init -u "$FTP_DEV_USERNAME" -p "$FTP_DEV_PASSWORD" ftp://$FTP_DEV_HOST/$FTP_DEV_FOLDER但是它忽略了供应商文件夹。我假设工件也会添加这个文件夹来部署。
有什么不对,或者我能做得更好?
发布于 2019-03-11 09:14:05
这是因为您可能有一个包含.gitignore目录的vendor。这些工件实际上是由bitbucket传递到下一步的,但是git-ftp忽略了这些工件。为了用git上传这些文件,您需要创建一个名为.git-ftp-include的文件,您需要在其中添加以下一行:!vendor/。如!中所述,文档是必需的
. Git-ftp -include文件指定Git-ftp应该上传的有意未跟踪的文件。如果你有一个文件应该总是上传,添加一行开始!后面跟着文件的名字。
https://stackoverflow.com/questions/55071333
复制相似问题