Skip to content

codefreshdemo/cf-example-deploy-elasticbeanstalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cf-example-deploy-elasticbeanstalk

Codefresh build status

Deployment to Elastic Beanstalk

Prerequiests

Deployment with Codefresh

  • Add encrypted environment variables for aws credentials.
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
  • Provide the following environment variables:
    • AWS_REGION
    • AWS_ENV_NAME
    • AWS_VERSION
    • AWS_BRANCH

codefresh

The ${{AWS_VERSION}} of application you can find in the Elastic Beanstalk service codefresh

Add the following step to codefresh.yml

deploy-elastic-beanstalk:
    fail-fast: false
    image: garland/aws-cli-docker:latest
    commands:
     - sh -c  "aws configure set region '${{AWS_REGION}}' && aws elasticbeanstalk update-environment --environment-name '${{AWS_ENV_NAME}}' --version-label '${{AWS_VERSION}}' "
    when:
      condition:
        all:
          masterBranch: "'${{CF_BRANCH}}' == '${{AWS_BRANCH}}'"

Deployment Flow

  • go to the Elastic Beanstalk service and create an application and environment codefresh
  • perform the following commands from root of your project
    • eb init
    • eb create ${{AWS_ENV_NAME}}

Note: If you don't have awsebcli - install EB CLI http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html

codefresh

  • add this repository to Codefresh, provide the necessary environments variables and build this service codefresh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published