daniel-bbt
daniel-bbt

Reputation: 11

Bitbucket Pipeline ssh response is No such file or directory

My bitbucket pipeline code is below. I would like to know why is bitbucket ssh returning no such file or directory?

image: php:7.4
pipelines:
  custom:
    build-and-deploy-to-dev:
      - step:
         deployment: Test
         script:
          - echo "test"
          - pipe: "atlassian/ssh-run:0.2.4"
            variables:
              SSH_USER: ubuntu
              SERVER: ec2-12-345-678-000.us-east-2.compute.amazonaws.com
              SSH_KEY: $SSH_KEY
              MODE: script
              COMMAND: deploy.sh

/pipe.sh: line 70: deploy.sh: No such file or directory

Upvotes: 0

Views: 2063

Answers (1)

Frugan
Frugan

Reputation: 389

Are you sure that the deploy.sh script exists in the home directory of the ubuntu user?
Be careful because with MODE: 'script' the script in your repository will be launched, while with MODE: 'command' the script already on your remote server will be launched.

Upvotes: 2

Related Questions