-
Notifications
You must be signed in to change notification settings - Fork 8
/
pipeline.gocd.yml
120 lines (119 loc) · 3.6 KB
/
pipeline.gocd.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
format_version: 3
pipelines:
appkeepm:
environment_variables:
AWS_PROFILE: "keeBeta"
AWS_REGION: "eu-west-2"
group: defaultGroup
materials:
mygit:
type: configrepo
keeFrontendDependency:
pipeline: keeFrontend
stage: publish
kprpcDependency:
pipeline: kprpc
stage: publish
stages:
- installDeps:
#clean_workspace: true
jobs:
defaultJob:
tasks:
- exec:
command: npm
arguments:
- "ci"
- build:
jobs:
defaultJob:
tasks:
- exec:
command: grunt
arguments:
- "--skip-sign"
- publish:
jobs:
defaultJob:
tasks:
- exec:
command: /bin/bash
arguments:
- "-c"
- "aws s3 sync dist/ s3://app-beta.kee.pm"
- exec:
command: /bin/bash
arguments:
- "-c"
- "aws cloudfront create-invalidation --distribution-id E3FJWMTO2ETM37 --paths /\\*"
appkeepmProduction:
environment_variables:
AWS_PROFILE: "keeProd"
AWS_REGION: "eu-west-2"
# secure_variables:
# AZURE_SAS: "AES:QoEhOHrSCRzO6i57EcQAsQ==:UDASdNfjlpqQPIP1puOgPUB9iNmeLZiey6OZ3YgJ8q2+Op1PhWUsgDHnJPIgf0UzUGTNWGtPWXrIDr/WenS/sJpd84grgH59XGLgcbEZhPxlbiPpUWZbnGqmIwwsE+fVAmQWfKmMYj8Z16UrIg3q0ywRrpUmWOKpPtsSETHcVwVrCMIJAU1csCxhXaFnu2ODE8yog0KYQe9ot2iM6L1e+gCPgsb8IOWqybJrtZgOPtI="
group: defaultGroup
materials:
mygit:
type: configrepo
appkeepmDependency:
pipeline: appkeepm
stage: publish
stages:
- installDeps:
#clean_workspace: true
jobs:
defaultJob:
tasks:
- exec:
command: npm
arguments:
- "ci"
- build:
jobs:
defaultJob:
tasks:
- exec:
command: grunt
arguments:
- "--skip-sign"
- publish:
approval: manual
jobs:
defaultJob:
tasks:
- exec:
command: /bin/bash
arguments:
- "-c"
- "aws s3 sync dist/ s3://keevault.pm"
- exec:
command: /bin/bash
arguments:
- "-c"
- "aws cloudfront create-invalidation --distribution-id E2RDOCYD2M73CI --paths /\\*"
# - publish:
# approval: manual
# jobs:
# defaultJob:
# tasks:
# - exec:
# command: npm
# arguments:
# - "run"
# - "prod-deploy"
# - "keevault"
# Encrypted vars in GoCD are very clunky. Recreate as needed by using this hack:
# curl 'https://cd.kee.pm:8154/go/api/admin/encrypt' --insecure -u 'username:password' -H 'Accept: application/vnd.go.cd.v1+json' -H 'Content-Type: application/json' -X POST -d '{"value": "badger"}'
# response:
# {
# "_links" : {
# "doc" : {
# "href" : "https://api.gocd.org/#encryption"
# },
# "self" : {
# "href" : "https://cd.kee.pm:8154/go/api/admin/encrypt"
# }
# },
# "encrypted_value" : "AES:..."
# }