we wanted to auto sync the most updated file from git server to our production site.we have created a pipeline but its not working ...please guide us ...
no error is showing but the live server is not git not pull. git server's latest code but the live server is not pulled.
hello please reply
Hi @support
Welcome to the Bitbucket Cloud community!
May you please provide additional context? What does your pipeline configuration look like and what has been attempted already?
Cheers!
- Ben (Bitbucket Cloud Support)
# bitbucket-pipelines.yml
image: atlassian/default-image:latest
pipelines:branches:dev: # This pipeline runs for the dev branch- step:name: Deploy to Linux Serverscript:# 1. Setup environment variables- export SSH_HOST=${SSH_HOST}- export SSH_USER=${SSH_USER}- export DEPLOY_DIR=${DEPLOY_DIR}- export DEPLOY_PASS=${DEPLOY_PASS}
# 2. Install sshpass and SSH client- apt-get update && apt-get install -y sshpass openssh-client
# 3. Pull latest changes and set ownership- sshpass -p "$DEPLOY_PASS" ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "hostnamectl &&echo "===================================================" &&echo "hostnamectl command running successfully" &&cd $DEPLOY_DIR &&cp .env ../.env-bkp &&echo "===================================================" &&echo ".env file backed up to the user's home directory..." &&pwd &&git branch &&git pull origin dev &&echo "Code deployed successfully from bitbucket." &&cp ../.env-bkp .env &&echo ".env file reverted from the user's home directory..." &&echo "=========================Finished==========================""
I am using the local system to push git server but it does not reflect the live site.
It looks like you're new here. Sign in or register to get started.