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!