Paolo Falomo
Paolo Falomo

Reputation: 447

elastic beanstalk deploy same branch to multiple environments

I need to deploy the same branch to the production and staging environment.

This is my config.yml file.

branch-defaults:
  master:
    environment: production
global:
  application_name: ...
  default_ec2_keyname: ...
  default_platform: PHP 7.0
  default_region: eu-west-1
  profile: eb-cli
  sc: git

how can i do?

I tried eb use but it works just one-to-one (branch-to-env). I need one-to-many (branch-to-envs).

Upvotes: 2

Views: 1197

Answers (1)

Brian
Brian

Reputation: 5481

You can target a particular environment at deployment time by passing an argument to eb deploy - i.e. eb deploy production or eb deploy staging.

However, that will perform the package and upload steps twice; while the contents of the two packages should be the same, they will not be binary identical. In my opinion, a better workflow is to use eb deploy to deploy to a non-prod environment, and then to use the EB web console to deploy that exact same application version to production.

Upvotes: 5

Related Questions