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 FTP_HOST_OLD and
the value from FTP_HOST_OLD!?!?!?
...
--env=SERVER="$FTP_HOST" \
...
INFO: Starting FTP deployment to $FTP_HOST_OLD:/...
open: $FTP_HOST_OLD: Name does not resolve
...
In my repository variables list, I have the following (in exactly this order!):
FTP_USERNAME_OLD
FTP_HOST_OLD
FTP_USERNAME
FTP_HOST
FTP_PASSWORD
My bitbucket-pipelines.yml
clearly references FTP_HOST -
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
??? very strange... Now I renamed FTP_HOST_OLD to FFTP_HOST_OLD and in the pipeline log in found this:
...
--env=SERVER="$FTP_HOST"
...
INFO: Starting FTP deployment to $FFTP_HOST_OLD:/...
open: $FFTP_HOST_OLD: Name does not resolve
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.