Skip to content

Commit 61a5d2b

Browse files
committed
Prepare for adding the dockercfg generator
* 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
1 parent 5c1f544 commit 61a5d2b

26 files changed

+69
-40
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aws-deployment.env
1+
aws.env
22
codeship.aes
33
dockercfg
44
tmp

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# aws-deployment
2-
Docker container scripts to deploy to AWS
1+
# AWS related Docker images for Codeship Jet
2+
3+
## AWS Deployment
4+
5+
A Docker image with scripts to deploy to various AWS services, including S3, CodeDeploy and ElasticBeanstalk.
6+

aws.env.encrypted

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/9H0pTUBxD/gYdeyqxTTn21HnOG09qgBuAPFMMxPg/J37TMG0STgmQFnAp8uVJlV/bA90KLhKOxHCpEeizIF9SlFxQSbtRlVgotbMhrGZkotRguvWnRbK1nrwiQc3zJs2dVqk3dApDDWJrpQw5gxvIC0dzv8OR8Y1mR3vy/1RiYumJK0p3WjFbhM/zx5LUp+qFRr6sCOdVTaeS7nXpc3fQ8=

Dockerfile base/Dockerfile

+2-8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,5 @@ ENV \
66
PIP_DISABLE_PIP_VERSION_CHECK=true
77

88
RUN \
9-
apk --no-cache add \
10-
bash \
11-
curl \
12-
jq \
13-
zip && \
14-
pip install awscli==${AWS_CLI_VERSION}
15-
16-
COPY scripts/ /usr/bin/
9+
pip install awscli==${AWS_CLI_VERSION} && \
10+
mkdir -p "${HOME}/.aws"

codeship-services.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
awsdeployment:
1+
base:
2+
build:
3+
image: codeship/aws-base
4+
path: ./base
5+
dockerfile_path: Dockerfile
6+
deployment:
27
build:
38
image: codeship/aws-deployment
9+
path: ./deployment
410
dockerfile_path: Dockerfile
5-
encrypted_env_file: test/aws-deployment.env.encrypted
6-
environment:
7-
- AWS_DEFAULT_REGION=us-east-1
11+
encrypted_env_file: aws.env.encrypted
812
volumes:
9-
- ./:/deploy
13+
- ./deployment:/deploy

codeship-steps.yml

+38-22
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
1-
- name: Check for tooling
2-
service: awsdeployment
3-
command: /deploy/test/test_tools_available.sh
4-
- name: Tests
1+
- name: Build
52
type: parallel
6-
service: awsdeployment
73
steps:
8-
- name: S3, LS
9-
command: aws s3 ls s3://codeship_aws_deployment_integration_test
10-
- name: S3, CP Archive
11-
command: aws s3 cp /deploy/tmp/upload_to_s3.zip s3://codeship_aws_deployment_integration_test
12-
- name: S3, CP
13-
command: aws s3 cp /deploy/test/upload_to_s3 s3://codeship_aws_deployment_integration_test
14-
- name: Elastic Beanstalk
15-
command: /deploy/test/elastic_beanstalk/integration-test
16-
- name: Code Deploy
17-
command: /deploy/test/code_deploy/integration-test
18-
- name: Deploy
19-
service: awsdeployment
20-
tag: master
21-
type: push
22-
image_name: codeship/aws-deployment
23-
registry: https://index.docker.io/v1/
24-
encrypted_dockercfg_path: dockercfg.encrypted
4+
- name: AWS Base
5+
service: base
6+
command: true
7+
- name: AWS Deployment
8+
service: deployment
9+
command: true
10+
- name: Test
11+
type: serial
12+
steps:
13+
- name: AWS Deployment
14+
type: serial
15+
service: deployment
16+
steps:
17+
- name: Check for tooling
18+
command: /deploy/test/test_tools_available.sh
19+
- name: Tests
20+
type: parallel
21+
steps:
22+
- name: S3, LS
23+
command: aws s3 ls s3://codeship_aws_deployment_integration_test
24+
- name: S3, CP Archive
25+
command: aws s3 cp /deploy/tmp/upload_to_s3.zip s3://codeship_aws_deployment_integration_test
26+
- name: S3, CP
27+
command: aws s3 cp /deploy/test/upload_to_s3 s3://codeship_aws_deployment_integration_test
28+
- name: Elastic Beanstalk
29+
command: /deploy/test/elastic_beanstalk/integration-test
30+
- name: Code Deploy
31+
command: /deploy/test/code_deploy/integration-test
32+
- name: Deploy (to Docker Hub)
33+
type: serial
34+
steps:
35+
- name: AWS Deployment
36+
service: awsdeployment
37+
tag: master
38+
type: push
39+
image_name: codeship/aws-deployment
40+
encrypted_dockercfg_path: dockercfg.encrypted

deployment/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM codeship/aws-base:latest
2+
3+
4+
RUN \
5+
apk --no-cache add \
6+
bash \
7+
curl \
8+
jq \
9+
zip
10+
11+
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.

dockercfg.encrypted

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0F4dkWCDxRHUVZ8U8FIMtp4G9oBf+Qm2tlrjW3tH1LG1/VChx72pZTPn7kxuKe731MmsdVLFsftLNEYVL6SEU6SxK5EYko9GViHsVS/jYq6jcMRCdwMNKQ+Czcn28g8XORjZiEJ87Ek4UycYNlY+e8RzhwqHd95xz7AxDx3nNgNw/yM08xej4d4NxQ4gy43n76B0uXSmcYp41ORDcpPh54S0zC3oVmGTIjmwRpIbh8a253o8mtJFLGTTlNNintEyE67b0aQK6OIigzfe
1+
nl1VuB528iY2UpNJecWN0o87TXD+rXugS2IeD++YB40ACSWEYxj+XDpOPQY1XnoY3aGdFWsxmNTYlScRpM+vtHINI4vrBh5ezB7ASKSHBXNT81pbCY14ywwPifx3htLU4vSKxA3w/PKWMyRiZnCDiCy6q85/bWnpx3ZzHLJxhT/dZAlhV3MKLqwjGUh/4guW/RpyVo19npuwII+KMM3Zapb3sTTNtlXhd60mPbmTko2HLws3Xsyf0L0nly9TzeW8cmN3NyS0+WMYxW2I

test/aws-deployment.env.encrypted

-1
This file was deleted.

0 commit comments

Comments
 (0)