forked from willfarrell/codeship-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codeship-steps.sample.yml
72 lines (61 loc) · 1.57 KB
/
codeship-steps.sample.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
- name: Build Base Image
type: serial
steps:
- service: init
command: true
- service: node
command: true
- service: docker
command: true
- service: awscli
command: true
- name: Setup ENV
type: serial
service:
- init
- name: Build NodeJS Application
type: serial
services:
- node
steps:
- command: npm-ci
- tag: develop
command: npm run build
- tag: ^feature/
command: npm run build
- tag: ^release/
command: npm run build
- tag: ^hotfix/
command: npm run build
- name: Build Docker Application
type: serial
services:
- docker
steps:
- name: Build Docker Image
command: docker-build image-name ./path/to/Dockerfile/ tag-suffix
- name: Deploy Application
type: serial
services:
- aws
steps:
- name: Exit if not deployment branch
command: bash -c 'if ["${ENVIRONMENT}" == "default"]; then exit 0; fi'
- name: Deploy Serverless
command: npm run deploy
- name: Deploy Static Assets
command: aws-s3-deploy s3-bucket-name ./build /
- name: Invalidate CloudFront
type: serial
services:
- aws
steps:
- name: Development Invalidation
tag: develop
command: aws cloudfront create-invalidation --distribution-id ********* --paths /*
- name: Testing Invalidation
tag: ^release/
command: aws cloudfront create-invalidation --distribution-id ********* --paths /*
- name: Production Invalidation
tag: master
command: aws cloudfront create-invalidation --distribution-id ********* --paths /*