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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

Hi @Rob Kirby, try passing only 

'${BITBUCKET_CLONE_DIR}/'

as a LOCAL_PATH without an asterisk. 

Thanks @Alexander Zhukov , that was the problem :)

Like Oleksandr Kyrdan likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,227 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you