When executing pipeline, the git remote set-url origin command is executed http://bitbucket.org /$BITBUCKET_REPO_FULL_NAME, how to skip or replace the ssh command
bitbucket-pipelines.yml:
image: wodby/drupal-php:7.4-dev-4.21.4
pipelines:
branches:
dev:
#- step:
# name: Install Dependencies
# script:
# - composer install
- step:
name: "Deploy to Dev"
deployment: DEV
script:
- pipe: atlassian/rsync-deploy:0.12.0
variables:
USER: '${DEV_USER}'
SERVER: '${DEV_SERVER}'
REMOTE_PATH: '${DEV_PATH}'
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/'
SSH_PORT: '${DEV_PORT}'
DEBUG: 'true'
#EXTRA_ARGS: '-avzh --exclude-from=./ignorelist.txt'
# SSH_KEY: '<string>' # Optional.
DELETE_FLAG: 'false'
- pipe: atlassian/ssh-run:0.2.3
variables:
SSH_USER: '${DEV_USER}'
SERVER: '${DEV_SERVER}'
COMMAND: 'scripts/ssh-d8-script.sh'
PORT: '${DEV_PORT}'
DEBUG: 'true'
DEV_PATH_VAR: '${DEV_PATH}'
MODE: 'script'
Hi @Backend and welcome to the community!
It is not possible to skip any of the commands from the Build setup. However, you can change the URL of the remote origin by adding a command in the script of a certain step. There is a default variable ${BITBUCKET_GIT_SSH_ORIGIN} that you can use, in a command like the following:
- git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}
May I ask why you are looking to do this? There are no commands in your bitbucket-pipelines.yml file that interact with the Bitbucket repo for pulling or pushing changes.
If you use an SSH URL for origin and if you plan to add any git commands in your yml file that interact with the remote, you will also need to set up SSH keys. You can find more details here:
There are two options, one is listed in the section "SSH Key pair managed by Bitbucket Pipelines" and the second in the section "SSH Key pair managed with variables".
Please feel free to reach out if you have any questions!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.