如何使用BitBucket管道上传供应商文件夹
我正在尝试使用Bitbucket管道部署Laravel项目。使用此代码:
pipelines:
custom:
staging-init:
- step:
name: 'Init'
image: php:7.3-fpm
script:
- apt-get update && apt-get -y install git-ftp
- git ftp init --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
branches:
master:
- step:
name: 'Deploy'
image: php:7.3-fpm
script:
- apt-get update && apt-get -y install git-ftp
- git ftp push --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
- step:
name: 'Composer'
image: php:7.3-fpm
script:
- apt-get update && apt-get install -y unzip
- apt-get update && apt-get -y install git-ftp
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- cp .env.example .env
- composer install
- php artisan key:generate
- git ftp push --syncroot ./vendor --force --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
我还使用此代码创建了.git-ftp-include文件:
!./vendor
但是它忽略了供应商文件夹。我可以尝试上传供应商文件夹?
I am trying to deploy Laravel project using bitbucket pipeline. With this code:
pipelines:
custom:
staging-init:
- step:
name: 'Init'
image: php:7.3-fpm
script:
- apt-get update && apt-get -y install git-ftp
- git ftp init --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
branches:
master:
- step:
name: 'Deploy'
image: php:7.3-fpm
script:
- apt-get update && apt-get -y install git-ftp
- git ftp push --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
- step:
name: 'Composer'
image: php:7.3-fpm
script:
- apt-get update && apt-get install -y unzip
- apt-get update && apt-get -y install git-ftp
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- cp .env.example .env
- composer install
- php artisan key:generate
- git ftp push --syncroot ./vendor --force --user $FTP_USER --passwd $FTP_PASS $FTP_PATH
I also created .git-ftp-include file with this code:
!./vendor
But it ignores the vendor folder. What can I try to upload vendor folder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于如何通过FTP上传文件夹以在Bitbucket-Pipelines上下文中上传文件夹,我只建议您尝试Atlassian/ftp-deploy Pipe并删除De Git-FTP命令。
参见 https://bitbucket.orgg/product./product/features/pipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines/ppipelines /intemations?p = atlassian/ftp-deploy
关于为什么您的git-ftp功能失调,您应该更好地使用git-ftp标签!
Regarding the question about how to upload a folder via FTP for a deployment in a bitbucket-pipelines context, I can only suggest you try out the atlassian/ftp-deploy pipe and drop de git-ftp command.
See https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/ftp-deploy
On why your git-ftp is dysfunctional, you should better use the git-ftp tag!