/
shippable.yml
128 lines (116 loc) · 2.94 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
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
121
122
123
124
125
126
127
128
resources:
- name: inf_repo
type: gitRepo
integration: "avinci_gh"
pointer:
sourceName: "Shippable/infra"
branch: master
- name: rc_saas_state
type: state
- name: prod_saas_state
type: state
- name: prodci_saas_state
type: state
# PEM key for AWS RC account
- name: rc_aws_pem
type: integration
integration: aws-rc-pem
# CREDS for AWS RC account
- name: rc_aws_key
type: integration
integration: aws_rc_access
# CREDS for AWS PROD account
- name: prod_aws_key
type: integration
integration: aws_prod_access
# PEM key for AWS PROD account
- name: prod_aws_pem
type: integration
integration: aws-prod-pem
# CREDS for AWS PROD CI account
- name: prodci_aws_key
type: integration
integration: aws_prod_ci_access
# PEM key for AWS PROD CI account
- name: prodci_aws_pem
type: integration
integration: aws_prod_ci_pem
jobs:
- name: rc_saas_inf_prov
type: runSh
integrations:
- aws_rc_cloudwatch_lambda_kv
steps:
- IN: rc_aws_pem
switch: off
- IN: rc_aws_key
switch: off
- IN: rc_saas_state
switch: off
- IN: inf_repo
switch: off
- TASK:
script:
- pushd $(shipctl get_resource_state "inf_repo")
- ./provision.sh rc saas
- popd
- OUT: rc_saas_state
on_success:
- script: echo 'SUCCESS!'
on_failure:
- script: echo 'FAILURE!'
always:
- script: /build/IN/inf_repo/gitRepo/archiveProvisionState.sh rc saas
- name: prod_saas_inf_prov
type: runSh
integrations:
- aws_prod_cloudwatch_lambda_kv
steps:
- IN: prod_aws_pem
switch: off
- IN: prod_aws_key
switch: off
- IN: prod_saas_state
switch: off
- IN: inf_repo
switch: off
- TASK:
runtime:
options:
env:
- TF_VAR_enable_green: true
- TF_VAR_enable_blue: false
script:
- pushd $(shipctl get_resource_state "inf_repo")
- ./provision.sh prod saas
- popd
- OUT: prod_saas_state
on_success:
- script: echo 'SUCCESS!'
on_failure:
- script: echo 'FAILURE!'
always:
- script: /build/IN/inf_repo/gitRepo/archiveProvisionState.sh prod saas
- name: prodci_saas_inf_prov
type: runSh
steps:
- IN: prodci_aws_pem
switch: off
- IN: prodci_aws_key
switch: off
- IN: prodci_saas_state
switch: off
- IN: inf_repo
switch: off
- TASK:
script:
- pushd $(shipctl get_resource_state "inf_repo")
- ./provision.sh prodci saas
- popd
- OUT: prodci_saas_state
on_success:
- script: echo 'SUCCESS!'
on_failure:
- script: echo 'FAILURE!'
always:
- script: /build/IN/inf_repo/gitRepo/archiveProvisionState.sh prodci saas