please help to understand, why I not able to exclude the folder from SCP on bitbucket deploy pipeline
There is my example :
image: php:7.2-fpm
pipelines:
default:
- step:
script:
- apt-get update && apt-get install -qy git curl libmcrypt-dev mariadb-client
- yes | pecl install mcrypt-1.0.1
- docker-php-ext-install pdo_mysql
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- php artisan migrate
- php artisan serve &
- sleep 5
- ./vendor/bin/phpunit
- curl -vk http://localhost:8000
services:
- mysql
- step:
name: Deploy artifacts using SCP to DEV
deployment: development
script:
- pipe: atlassian/scp-deploy:1.0.1
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/tmp/deploy'
#REMOTE_PATH: '/srv/www/site.com/'
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/*'
EXTRA_ARGS: '--exclude=${BITBUCKET_CLONE_DIR}/vendor/* --exclude=${BITBUCKET_CLONE_DIR}/.env'
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'test'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'test'
MYSQL_PASSWORD: 'test'
This example is working, but due to "vendor" folder is huge, I want to exclude from SCP it.
Why on extra args exclude is not working?
Thanks
Solution
Just replace your "SCP" image on RSYNC one
pipe: atlassian/rsync-deploy:0.5.0