1

With the current syntax of bitbucket's EXTRA_ARGS variable one directory is excluded from deployment like this:

EXTRA_ARGS: '--exclude=YOUR_DESIRE_FOLDER_PATH/*'

(Bitbucket Pipeline - how to exclude files or folders?)

But how to exclude multiple directories?

Rich Steinmetz
  • 1,020
  • 13
  • 28

1 Answers1

1

First, note that not every pipe has a support for --exclude option, as some pipes are just wrappers around the cli tools, like rsync or sftp. However, if you use the rsync-deploy pipe, you should be able to use multiple --exclude options:

script:
  - pipe: atlassian/rsync-deploy:0.3.2
    variables:
      USER: 'ec2-user'
      SERVER: '127.0.0.1'
      REMOTE_PATH: '/var/www/build/'
      LOCAL_PATH: 'build'
      DEBUG: 'true'
      EXTRA_ARGS: '--exclude=*.txt --exclude=src/*'
Alexander Zhukov
  • 4,357
  • 1
  • 20
  • 31