Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to deploy hidden dotfiles (.env) with rsync-deploy:0.4.0

Rob Kirby January 17, 2020

Hi, I'm using the rsync-deploy pipe in my pipeline setup and everything is working as expected except for one file that won't copy.

In the root of my project I have a .env.example file which I want to rename .env and deploy to the server with rsync but it never appears on the server, is there some flags or args I can use on the rsync pipe to make this work?

Heres my pipelines set up, the last step has the rsync pipe

- image: php:7.1.29
options:
  max-time: 10
definitions:
  caches:
    node: web/assets/node_modules
pipelines:
  branches:
    dev:
    - step:
        name: Composer Staging
        caches:
          - composer
        artifacts:
          - vendor/**
        script:
          - apt-get update && apt-get install -y unzip libzip-dev
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - docker-php-ext-install zip
          - composer install
    - step:
        name: Build Staging Assets
        image: node:10.18.1
        caches:
          - node
        artifacts:
          - web/assets/css/**
          - web/assets/js/**
        script:
          - cp .env.example .env
          - cd web/assets/
          - npm install --global gulp-cli
          - npm install
          - gulp
    - step:
        name: Deploy Staging
        deployment: staging
        script:
          - pipe: atlassian/rsync-deploy:0.4.0
            variables:
              USER: $STAGING_USER
              SERVER: $STAGING_SERVER
              REMOTE_PATH: 'public_html/staging/'
              LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/*'
              DEBUG: 'true'
              EXTRA_ARGS: '-ravz --exclude="/web/assets/node_modules" 

 

1 answer

1 accepted

1 vote
Answer accepted
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2020

Hi @Rob Kirby, try passing only 

'${BITBUCKET_CLONE_DIR}/'

as a LOCAL_PATH without an asterisk. 

Rob Kirby January 20, 2020

Thanks @Alexander Zhukov , that was the problem :)

Like Oleksandr Kyrdan likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events