Skip to content

Commit

Permalink
Prepare for adding the dockercfg generator
Browse files Browse the repository at this point in the history
* Move all files to a deployment subdirectory
* Extract the aws-base Docker image
* Update service and step files to make it easier to add the second set of images
* Update the Readme
  • Loading branch information
mlocher committed Sep 14, 2016
1 parent 5c1f544 commit 61a5d2b
Show file tree
Hide file tree
Showing 26 changed files with 69 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aws-deployment.env
aws.env
codeship.aes
dockercfg
tmp
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# aws-deployment
Docker container scripts to deploy to AWS
# AWS related Docker images for Codeship Jet

## AWS Deployment

A Docker image with scripts to deploy to various AWS services, including S3, CodeDeploy and ElasticBeanstalk.

1 change: 1 addition & 0 deletions aws.env.encrypted
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/9H0pTUBxD/gYdeyqxTTn21HnOG09qgBuAPFMMxPg/J37TMG0STgmQFnAp8uVJlV/bA90KLhKOxHCpEeizIF9SlFxQSbtRlVgotbMhrGZkotRguvWnRbK1nrwiQc3zJs2dVqk3dApDDWJrpQw5gxvIC0dzv8OR8Y1mR3vy/1RiYumJK0p3WjFbhM/zx5LUp+qFRr6sCOdVTaeS7nXpc3fQ8=
10 changes: 2 additions & 8 deletions Dockerfile → base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@ ENV \
PIP_DISABLE_PIP_VERSION_CHECK=true

RUN \
apk --no-cache add \
bash \
curl \
jq \
zip && \
pip install awscli==${AWS_CLI_VERSION}

COPY scripts/ /usr/bin/
pip install awscli==${AWS_CLI_VERSION} && \
mkdir -p "${HOME}/.aws"
14 changes: 9 additions & 5 deletions codeship-services.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
awsdeployment:
base:
build:
image: codeship/aws-base
path: ./base
dockerfile_path: Dockerfile
deployment:
build:
image: codeship/aws-deployment
path: ./deployment
dockerfile_path: Dockerfile
encrypted_env_file: test/aws-deployment.env.encrypted
environment:
- AWS_DEFAULT_REGION=us-east-1
encrypted_env_file: aws.env.encrypted
volumes:
- ./:/deploy
- ./deployment:/deploy
60 changes: 38 additions & 22 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
- name: Check for tooling
service: awsdeployment
command: /deploy/test/test_tools_available.sh
- name: Tests
- name: Build
type: parallel
service: awsdeployment
steps:
- name: S3, LS
command: aws s3 ls s3://codeship_aws_deployment_integration_test
- name: S3, CP Archive
command: aws s3 cp /deploy/tmp/upload_to_s3.zip s3://codeship_aws_deployment_integration_test
- name: S3, CP
command: aws s3 cp /deploy/test/upload_to_s3 s3://codeship_aws_deployment_integration_test
- name: Elastic Beanstalk
command: /deploy/test/elastic_beanstalk/integration-test
- name: Code Deploy
command: /deploy/test/code_deploy/integration-test
- name: Deploy
service: awsdeployment
tag: master
type: push
image_name: codeship/aws-deployment
registry: https://index.docker.io/v1/
encrypted_dockercfg_path: dockercfg.encrypted
- name: AWS Base
service: base
command: true
- name: AWS Deployment
service: deployment
command: true
- name: Test
type: serial
steps:
- name: AWS Deployment
type: serial
service: deployment
steps:
- name: Check for tooling
command: /deploy/test/test_tools_available.sh
- name: Tests
type: parallel
steps:
- name: S3, LS
command: aws s3 ls s3://codeship_aws_deployment_integration_test
- name: S3, CP Archive
command: aws s3 cp /deploy/tmp/upload_to_s3.zip s3://codeship_aws_deployment_integration_test
- name: S3, CP
command: aws s3 cp /deploy/test/upload_to_s3 s3://codeship_aws_deployment_integration_test
- name: Elastic Beanstalk
command: /deploy/test/elastic_beanstalk/integration-test
- name: Code Deploy
command: /deploy/test/code_deploy/integration-test
- name: Deploy (to Docker Hub)
type: serial
steps:
- name: AWS Deployment
service: awsdeployment
tag: master
type: push
image_name: codeship/aws-deployment
encrypted_dockercfg_path: dockercfg.encrypted
11 changes: 11 additions & 0 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM codeship/aws-base:latest
MAINTAINER maintainers@codeship.com

RUN \
apk --no-cache add \
bash \
curl \
jq \
zip

COPY scripts/ /usr/bin/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dockercfg.encrypted
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0F4dkWCDxRHUVZ8U8FIMtp4G9oBf+Qm2tlrjW3tH1LG1/VChx72pZTPn7kxuKe731MmsdVLFsftLNEYVL6SEU6SxK5EYko9GViHsVS/jYq6jcMRCdwMNKQ+Czcn28g8XORjZiEJ87Ek4UycYNlY+e8RzhwqHd95xz7AxDx3nNgNw/yM08xej4d4NxQ4gy43n76B0uXSmcYp41ORDcpPh54S0zC3oVmGTIjmwRpIbh8a253o8mtJFLGTTlNNintEyE67b0aQK6OIigzfe
nl1VuB528iY2UpNJecWN0o87TXD+rXugS2IeD++YB40ACSWEYxj+XDpOPQY1XnoY3aGdFWsxmNTYlScRpM+vtHINI4vrBh5ezB7ASKSHBXNT81pbCY14ywwPifx3htLU4vSKxA3w/PKWMyRiZnCDiCy6q85/bWnpx3ZzHLJxhT/dZAlhV3MKLqwjGUh/4guW/RpyVo19npuwII+KMM3Zapb3sTTNtlXhd60mPbmTko2HLws3Xsyf0L0nly9TzeW8cmN3NyS0+WMYxW2I
1 change: 0 additions & 1 deletion test/aws-deployment.env.encrypted

This file was deleted.

0 comments on commit 61a5d2b

Please sign in to comment.