Hi, I'm new to Bitbucket Pipelines. I have just started using it with git-ftp for deployments by following the tutorial here.
I currently have my bitbucket-pipelines.yml file like so:
image: samueldebruyn/debian-git
pipelines:
branches: # matched against branches in your Git repository
staging: # branch name
- step:
name: Get deploy sync list # files in .git-ftp-ignore should not be listed
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --dry-run --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://MY_SERVER # dry run so nothing is uploaded
- step:
name: Manually deploy staging
deployment: staging
trigger: manual # manually trigger the deployment if the sync list in the previous step looks good
script:
- apt-get update # QUESTION: is there a way to avoid being redundant on this?
- apt-get -qq install git-ftp # QUESTION: is there a way to avoid being redundant on this?
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://MY_SERVER
The first step lets me review my file change list before I deploy them. The second step lets me manually hit the deploy button if everything looks good.
My question is, is there a way to not have to re-install git-ftp in step 2? It feels redundant and a waste of build minutes to run 2 git-ftp related commands.
I like @Adarsh Kurudi idea and created an image with pre-installed git-ftp if anyone is interested: https://hub.docker.com/r/wagnerstephan/bitbucket-git-ftp
You could just create your own docker image with git-ftp pre installed. This way you do not have to run
- apt-get update
- apt-get -qq install git-ftp
This will help you save on a few precious build minutes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.