Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipeline configuration error - Missing or empty command string

Zoran Davidović
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2020

Hello,

I'm trying to SSH to my server and execute some commands each time I push code to master branch. I'm using ssh-run pipe. I've defined all variables used in this script. I also added ssh key, added host to the list of known hosts and fetched fingerprint.

This is my bitbucket-pipelines.yml file:

image: atlassian/default-image:2

pipelines:
  branches:
    master:
      - step:
          script:
            - name: "SSH Deploy to production web"
            - pipe: atlassian/ssh-run:0.2.6
              variables:
                SSH_USER: $SSH_USER
                SERVER: $SSH_SERVER
                COMMAND: $SSH_COMMAND
                PORT: $SSH_PORT

Now the error I get is:

Screenshot from 2020-08-05 17-21-45.png

I guess the problem is with the yaml file, but Bitbucket pipeline validator shows no errors.

I would appreciate any help at this point.

1 answer

1 accepted

1 vote
Answer accepted
mdgmichael August 5, 2020

I think you want the "name" property under "step" rather than "script":

image: atlassian/default-image:2

pipelines:
branches:
master:
- step:
name: "SSH Deploy to production web"
script:
- pipe: atlassian/ssh-run:0.2.6
variables:
SSH_USER: $SSH_USER
SERVER: $SSH_SERVER
COMMAND: $SSH_COMMAND
PORT: $SSH_PORT 

 Caveat: have not tested this myself.

Zoran Davidović
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2020

Hi @mdgmichael ,

I actually solved it by removing name property altogether.

Now my bitbucket-pipelines.yml file looks like this:

image: atlassian/default-image:2

pipelines:
  branches:
    master:
      - step:
          script:
            - pipe: atlassian/ssh-run:0.2.6
              variables:
                SSH_USER: $SSH_USER
                SERVER: $SSH_SERVER
                COMMAND: $SSH_COMMAND
                PORT: $SSH_PORT

 Cheers!

Like mdgmichael likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events