-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshippable.yml
90 lines (76 loc) · 2.48 KB
/
shippable.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Language setting http://docs.shippable.com/ci/languages/node/
language: node_js
# # use this to control what branches get built.
# # http://docs.shippable.com/ci/advancedOptions/branches/
# branches:
# only:
# - master
# using pre-defined build variables
# full list http://docs.shippable.com/ci/advancedOptions/environmentVariables/
build:
# http://docs.shippable.com/ci/shippableyml/#ci
ci:
- 'true'
post_ci:
- 'if [ $IS_PULL_REQUEST == "false" ] ; then docker build -f Dockerfile.nginx -t 050543387869.dkr.ecr.eu-west-1.amazonaws.com/nginx:$BRANCH.$BUILD_NUMBER .; fi'
- 'if [ $IS_PULL_REQUEST == "false" ] ; then docker push 050543387869.dkr.ecr.eu-west-1.amazonaws.com/nginx:$BRANCH.$BUILD_NUMBER ; fi'
- 'if [ $IS_PULL_REQUEST == "false" ] ; then shipctl post_resource_state deploy-ecs-basic-image versionName $BRANCH.$BUILD_NUMBER; fi'
# Integrations are used to connect external resources to CI
# http://docs.shippable.com/integrations/overview/
integrations:
# adding awsKeys integration so that credentials are available to CI Job
# http://docs.shippable.com/platform/integration/aws-keys/
hub:
- integrationName: aws
type: amazonKeys
region: eu-west-1
resources:
- name: deploy-ecs-basic-image
type: image
integration: aws
pointer:
sourceName: "050543387869.dkr.ecr.eu-west-1.amazonaws.com/nginx"
seed:
versionName: "latest"
- name: deploy-ecs-basic-params
type: params
version:
params:
ENVIRONMENT: "dev"
- name: deploy-ecs-basic-docker-options
type: dockerOptions
versionTemplate:
linuxParameters:
initProcessEnabled: true
memory: 100
portMappings:
- 80:80
- name: deploy-ecs-basic-replicas
type: replicas
version:
count: 1
- name: deploy-ecs-basic-ecs-cluster
type: cluster
integration: aws
pointer:
sourceName : "microservices-production" #name of the cluster to which we are deploying
region: "eu-west-1"
jobs:
- name: deploy-ecs-basic_runCI
type: runCI
steps:
- OUT: deploy-ecs-basic-image
- name: deploy-ecs-basic-manifest
type: manifest
steps:
- IN: deploy-ecs-basic-image
- IN: deploy-ecs-basic-docker-options
- IN: deploy-ecs-basic-params
- IN: deploy-ecs-basic-replicas
- name: deploy-ecs-basic-deploy
type: deploy
steps:
- IN: deploy-ecs-basic-manifest
- IN: deploy-ecs-basic-ecs-cluster
- TASK: managed
deployMethod: replace