forked from ttrahan/micro-mono
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathshippable.yml
84 lines (73 loc) · 1.86 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
# Language setting
language: node_js
# Version number
node_js:
- 8.2.1
env:
global:
- XUNIT_FILE=$SHIPPABLE_BUILD_DIR/shippable/testresults/result.xml API_PORT=80
build:
ci:
# create directories needed for unit tests and code coverage
- mkdir -p $SHIPPABLE_BUILD_DIR/shippable/testresults
- mkdir -p $SHIPPABLE_BUILD_DIR/shippable/codecoverage
# run a script that detects if any microservice code has changed and tests,
# builds and publishes the docker image to ECR
- |
if [ "$IS_PULL_REQUEST" != true ]; then
./detect-changed-services.sh
else
echo "skipping because it's a PR"
fi
# ECR subscription integration that automatically does a docker login into ECR
# using credentials specified in the account integration
integrations:
hub:
- integrationName: "dr-aws-keys"
type: ecr
region: us-east-1
branches:
only:
- master
resources:
- name: api_img
type: image
integration: dr-aws-keys
pointer:
sourceName: "679404489841.dkr.ecr.us-east-1.amazonaws.com/api"
seed:
versionName: "master.1"
- name: www_img
type: image
integration: dr-aws-keys
pointer:
sourceName: "679404489841.dkr.ecr.us-east-1.amazonaws.com/www"
seed:
versionName: "master.1"
- name: ecs_cluster
type: cluster
integration: dr-aws
pointer:
sourceName : "mono-repo" #name of the cluster to which we are deploying
region: "us-east-1"
jobs:
- name: app-mono_runCI
type: runCI
steps:
- OUT: api_img
- OUT: www_img
- name: micro_api_def
type: manifest
steps:
- IN: api_img
- name: micro_www_def
type: manifest
steps:
- IN: www_img
- name: app_deploy
type: deploy
method: replace
steps:
- IN: micro_api_def
- IN: micro_www_def
- IN: ecs_cluster