You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
When I run the Bitbucket pipeline I always have this error (in bold) I can't resolve:
In the build log:
--env=COMMAND="./ansible/deploy-dev.sh" \
--env=MODE="script" \
--env=SERVER="$SSH_JUMP_HOST" \
--env=SSH_KEY="$SSH_JUMP" \
--env=SSH_USER="$SSH_JUMP_USER" \
...
...
Status: Downloaded newer image for bitbucketpipelines/ssh-run:0.4.0
INFO: Executing the pipe...
/pipe.sh: line 26: SERVER: SERVER variable missing.
SERVER variable is set and provided by a repository variable.
bitbucket-pipelines.yml
...
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
```
Someone has a clue ?
Hi @nils-m,
I've seen this error occur because of incorrect indentation in the bitbucket-pipelines.yml file.
Indentation for branches:, develop: and - step: should be at least 1 space from the parent level.
Indentation for children of - step: (like script:) should be at least 3 spaces from the parent.
Commands in the script do not need to be intended from the parent level script:, but you can add indentation for readability.
For pipes
the keyword variables: needs to be intended at least 2 spaces from - pipe
the actual variables need to be intended at least 1 space from variables:
pipelines:
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
Can you check the content of your bitbucket-pipelines.yml file in our validator here https://bitbucket-pipelines.atlassian.io/validator ?
Kind regards,
Theodora
Oh gosh, that was it !
This should be documented, imagine the time spent ...
Could we have a reasonable explanation why the yaml is interpreted this way ?
Thanks !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @nils-m,
It's good to hear that the issue is resolved, and you are very welcome!
I was actually mistaken about the indentation, it needs to be at least 1 and 3 spaces respectively (instead of 2 and 4 exactly that I mentioned).
I will edit my previous response with the correct info. Indentation has to do with the type of data structures used in the yml file, I will create a request with my team to include info about indentation in the documentation.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.