Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Invalid script section on yaml anchor Edited

Hi,

 

I've been trying to figure out how to fix my issue in bitbucket pipelines. I had the same issue in the past but never figured out how I was able to resolved it (feels like a cache reset somewhere...). Whatsoever, the following yaml gives me the following error:


No commands or pipes defined for the step at [pipelines > branches > bitbucket-p

ipeline-test > 1 > step]. Check that you have defined a valid "script" section.

 

The yaml is valid through the bitbucket-pipeline validator, I tried to change the indentation at various places , but I still face the same problem

# Build configuration for Project
# -----
image: node:12

definitions:
pipes:
- pipe: &AWSCodeDeployUploadPipe
pipe: atlassian/aws-code-deploy:0.6.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: $AWS_APPLICATION_NAME
COMMAND: upload
DEPLOYMENT_GROUP: $AWS_DEPLOYMENT_GROUP
S3_BUCKET: $AWS_S3_BUCKET
ZIP_FILE: codedeploy-artifact.zip

- pipe: &AWSCodeDeployDeployPipe
pipe: atlassian/aws-code-deploy:0.6.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: $AWS_APPLICATION_NAME
COMMAND: deploy
DEPLOYMENT_GROUP: $AWS_DEPLOYMENT_GROUP
S3_BUCKET: $AWS_S3_BUCKET

steps:
- step: &BuildTestPackageStep
name: Build and Test
script:
- npm ci
- npm test
- npm run build
artifacts:
- '**'

- step: &UploadDeployAWSStep
deployment: integration
name: Upload and Deploy to AWS
image: atlassian/default-image:2
script:
- /bin/bash generateCodeDeployArtifact.sh
- *AWSCodeDeployUploadPipe
- *AWSCodeDeployDeployPipe

pipelines:
branches:
bitbucket-pipeline-test:
- step: *BuildTestPackageStep
- step:
≤≤: *UploadDeployAWSStep
name: test

 If I change the last section to the following it works... but I'm losing the flexibility to change the deployment environment ;) :

pipelines:
branches:
bitbucket-pipeline-test:
- step: *BuildTestPackageStep
- step: *UploadDeployAWSStep

Thanks for the help!

1 answer

1 accepted

0 votes
Answer accepted

Fix:

I can't believe it was that simple. My keyboard language changed by inadvertence and the symbol  "≤" was at the same place as my usual "<" ... My eyes just went over that small detail.

Replacing it with the correct character fixed the issue...

The bitbucket pipeline validator didn't catch that issue due to the following bug: https://jira.atlassian.com/browse/BCLOUD-18299

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

⚡️NEW Group for Confluence Cloud Admins

Calling all Confluence Cloud Admins!  We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...

88 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you