Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AWS Elastic Beanstalk deploy fails silently, but shows success

kenkinder February 28, 2019

I'm a bit at a loss. I'm using AWS Elastic Beanstalk Pipe with BitBucketi pipelines. Here's our pipeline, with minimal redaction and some simplification since this is a public forum.

image: node:6.9.4

pipelines:
branches:
master:
- step:
name: Build
caches:
- node
script: # Modify the commands below to build your repository.
- npm install
- API_URL=[redacted] npm run build
- mv dist dist
artifacts:
- dist
- step:
name: Zip
image: atlassian/default-image:2
script:
- apt-get install zip
- cd dist
- zip -r ../application-deploy.zip *
artifacts:
- application-deploy.zip
- step:
name: Deploy to Staging
deployment: staging
script:
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.3
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: '[redacted]'
COMMAND: 'only-deploy'
VERSION_LABEL: 'ci-staging-${ENVIRONMENT_NAME}_${BITBUCKET_COMMIT:0:8}_YYYY-mm-dd_HHMMSS)'
ENVIRONMENT_NAME: '[redacted]'
ZIP_FILE: 'application-deploy.zip'
WAIT: 'true'
DEBUG: 'true'

 Upon using this pipeline, it passes with a nice green checkmark.

bitbucket-fail.png

However, the deployment never appears to happen! There's nothing uploaded in our application versions, there's no changes to the actual environment. BitBucket Pipes is showing success, but no deployment has happened.

What gives?

 

1 answer

0 votes
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2019

Hey @kenkinder ,

There is a typo in the example we have in our docs. Valid values for `COMMAND` are `deploy-only` and `upload-only` (default to `all`). We have a fix on its way: https://bitbucket.org/atlassian/aws-elasticbeanstalk-deploy/pull-requests/8

According to your example (i.e. having only have one environment to deploy to) I would recommend not passing any command parameter (which would perform upload and deploy at the same time). 

If you had more than one environment to deploy to, I would recommend using the COMMAND: `upload-only` in the ZIP step. And then using the `deploy-only` in subsequent deployment steps, to avoid uploading the file and generating a version each time per environment.

See an example with multiple environments here: https://bitbucket.org/bitbucketpipelines/example-aws-elasticbeanstalk-deploy/

Does it make sense?

Regards,

Raul

Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2019 edited

Hey @kenkinder ,

The fix is out! if you use the new version 0.2.5, you will now see that docs are fixed and the parameters will be validated in case there is wrong input.

Regards,

Raul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events