Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
/ awscli Public archive
forked from innovator-japan/awscli

awscli container for CircleCI 2.0

Notifications You must be signed in to change notification settings

10mado/awscli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

awscli

Docker container for CircleCI2.0 -> codedeploy.

Supported tags

Tag is correspond to awscli version.

  • latest
  • 1.14.69

How to use

This container provides aws-s3-deploy command, which allows you to deploy your apps with Codedeploy via Amazon S3.

You can also use this container just for awscli command.

Sample config.yml

version: 2
jobs:
  build:
    working_directory: ~/repo
    docker:
      - image: circleci/php:7.2-apache-node-browsers
    steps:
      - checkout
      - restore_cache:
          keys:
            - composer_cache
      - run: composer install --prefer-dist
      - save_cache:
          paths:
            - "~/.composer/cache"
          key: composer_cache
      - persist_to_workspace:
          root: .
          paths:
            - .
  deploy:
    working_directory: ~/repo
    environment:
      - AWS_DEFAULT_REGION: ap-northeast-1
      - CODE_DEPLOY_S3_BUCKET_NAME: xxxx-deploy
      - CODE_DEPLOY_APPLICATION_NAME: xxxxxxx
      - CODE_DEPLOY_GROUP_NAME: xxxxxx 
      - APP_DIR: .
    docker:
      - image: innovatorjapan/awscli:latest
    steps:
      - attach_workspace:
          at: .
      - run: sh /bin/aws-s3-deploy
workflows:
  version: 2
  build_and_deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
          filters:
            branches:
              only:
                - master

Note

deploy job uses attach_workspace to restore built image files from build job.

Environmental variables

You need to set following variables to use asw-s3-deploy command.

  • AWS_DEFAULT_REGION Set region for your codedeploy application.
  • CODE_DEPLOY_S3_BUCKET_NAME Set s3 bucket for codedeploy.
  • CODE_DEPLOY_APPLICATION_NAME Set codedeploy application name.
  • CODE_DEPLOY_GROUP_NAME Set codedeploy application group name.
  • APP_DIR Set application dir to deploy.

About

awscli container for CircleCI 2.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%