Hi everyone,
I wanted to update the FTP credentials used in my Bitbucket Pipeline today.
To do this, I renamed the existing repository variables:
FTP_HOST → FTP_HOST_OLD
Then I created a new variable named FTP_HOST with the new credentials and ran the pipeline.
The pipeline completed successfully (green status), but no update happened on my server.
When checking the pipeline logs, I noticed that the SERVER variable uses <strong>FTP_HOST_OLD</strong> and the value from <strong>FTP_HOST_OLD</strong>!?!?!?
...<br><span>--env=SERVER="$<strong>FTP_HOST</strong>" \</span><br>...<br><span>INFO: Starting FTP deployment to $<strong>FTP_HOST_OLD</strong>:/...</span><br><span>open: $<strong>FTP_HOST_OLD</strong>: Name does not resolve</span><br>...
In my repository variables list, I have the following (in exactly this order!):
<span>FTP_USERNAME_OLD</span>- FTP_PASSWORD_OLD
FTP_HOST_OLDFTP_USERNAMEFTP_HOSTFTP_PASSWORD
My bitbucket-pipelines.yml clearly references <strong>FTP_HOST</strong> - This is my bitbucket-pipeline.yml:
image: atlassian/default-image:2
pipelines:
branches:
master:
- step:
name: Deploy to mydomain.com
deployment: production
script:
- pipe: atlassian/ftp-deploy:0.7.1
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: $FTP_HOST
REMOTE_PATH: /
EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore" # Ignore these
Question:
Does anyone know why Bitbucket is using the wrong variable?
Or is this a bug (or maybe an intended feature)?
Yeah, I guess deleting the _OLD variable would fix it, but this behavior seems kind of buggy, right?
Michael