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.
definitions:
- step:
name: build
script:
- &build-test |
apt-get update && apt-get install -y curl jq
RESPONSE=$(curl -sSLO -w "%{http_code}" --header "Authorization: Bearer ${ACCESS_TOKEN_LOCAL}" "https://api.bitbucket.org/2.0/repositories/pipeline-tutorial/global-variables/src/master/global-variables.yml")
echo ${RESPONSE}
HTTP_STATUS=${RESPONSE:${#RESPONSE}-3}
if [[ $HTTP_STATUS == 200 ]]; then echo "Download successful"; else echo "Download failed with HTTP status code: $HTTP_STATUS"; fi
source <(cat global-variables.yml | jq -r 'to_entries[] | "export \(.key)=\(.value | @SH)"')
pipelines:
default:
- step:
name: Build and Test
script:
- *build-test
- step:
name: Deploy
script:
- *build-test
- echo $USERNAME
- echo $EMAIL_SUBJECT
Hi @Satish Kumar and welcome to the community!
I believe the error occurs because you are missing the keyword steps in the definitions section, you can try adding it as follows:
definitions:
steps:
- step:
Make sure that the indentation is also correct. Each level should have at least 1 space indentation from the previous one, except for the levels under - step: (these should have at least 3 spaces)
Kind regards,
Theodora
Try using the validator: https://bitbucket-pipelines.atlassian.io/validator
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.