-
Notifications
You must be signed in to change notification settings - Fork 56
/
cumulusci.yml
187 lines (166 loc) · 6.79 KB
/
cumulusci.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
minimum_cumulusci_version: '3.34.0'
project:
name: SummitEventsApp
package:
name: Summit Events App
namespace: summit
api_version: "61.0"
source_format: sfdx
git:
default_branch: master
repo_url: https://github.com/SFDO-Community/Summit-Events-App
tasks:
deploy_site_config:
description: Deploys configuration for Development.
class_path: cumulusci.tasks.salesforce.Deploy
options:
namespace_inject: $project_config.project__package__namespace
path: unpackaged/config/site
create_fake_school_data:
description: Makes fake account data to mimic schools with Education as industry
class_path: cumulusci.tasks.bulkdata.snowfakery.Snowfakery
options:
recipe: datasets/snowfakery/school_recipe.yml
deploy_guest_sharing_rules:
description: Deploys configuration for Development.
class_path: cumulusci.tasks.salesforce.Deploy
options:
namespace_inject: $project_config.project__package__namespace
path: unpackaged/config/sharing
deploy_namespaced_guest_sharing_rules:
description: Deploys configuration for Development.
class_path: cumulusci.tasks.salesforce.Deploy
options:
namespace_inject: $project_config.project__package__namespace
path: unpackaged/config/summit__sharing
deploy_site_settings:
description: Setup the Custom Settings for the Event Site
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
options:
namespace_inject: $project_config.project__package__namespace
apex: >
Site mySite = [SELECT Id FROM Site WHERE Name = 'Summit_Events'];
SiteDetail mySiteDetail = [SELECT SecureURL FROM SiteDetail WHERE DurableId = :mySite.Id];
String url = mySiteDetail.SecureURL;
%%%NAMESPACE%%%Summit_Events_Settings__c eventSettings = %%%NAMESPACE%%%Summit_Events_Settings__c.getOrgDefaults();
eventSettings.%%%NAMESPACE%%%Community_Base_URL__c = url;
eventSettings.%%%NAMESPACE%%%Managed_Package__c = false;
upsert eventSettings;
deploy_permission_set:
description: Give System Admins Event Admin Permission Set
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
options:
namespace_inject: $project_config.project__package__namespace
apex: >
List<PermissionSet> eventPermissionSets;
eventPermissionSets = [SELECT Name, Id FROM PermissionSet WHERE Name = 'Summit_Events_Admin'];
List<PermissionSetAssignment> permissionSetList = new List<PermissionSetAssignment>();
if (!eventPermissionSets.isEmpty()) {
for (User u: [ SELECT ID FROM User WHERE Profile.Name = 'System Administrator' ]) {
permissionSetList.add(new PermissionSetAssignment(PermissionSetId = eventPermissionSets[0].Id, AssigneeId = u.Id));
}
}
if (!permissionSetList.isEmpty()) {
upsert permissionSetList;
}
deploy_guest_permission_set:
description: Give System Admins Event Admin Permission Set
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
options:
namespace_inject: $project_config.project__package__namespace
apex: >
String siteName = 'Summit_Events';
Site site = [
SELECT GuestUserId
FROM Site
WHERE Name = :siteName
];
List<PermissionSet> eventPermissionSets;
eventPermissionSets = [SELECT Name, Id FROM PermissionSet WHERE Name = 'Summit_Events_Registrant'];
List<PermissionSetAssignment> permissionSetList = new List<PermissionSetAssignment>();
if (!eventPermissionSets.isEmpty()) {
permissionSetList.add(new PermissionSetAssignment(PermissionSetId = eventPermissionSets[0].Id, AssigneeId = site.GuestUserId));
}
if (!permissionSetList.isEmpty()) {
upsert permissionSetList;
}
robot:
options:
suites: robot/SummitEventsApp/tests
options:
outputdir: robot/SummitEventsApp/results
robot_testdoc:
options:
path: robot/SummitEventsApp/tests
output: robot/SummitEventsApp/doc/SummitEventsApp_tests.html
install_managed:
options:
security_type: NONE
update_dependencies:
options:
security_type: NONE
flows:
config_qa:
steps:
3:
task: deploy_permission_set
4:
task: deploy_site_config
5:
task: deploy_site_settings
6:
task: deploy_guest_permission_set
7:
task: deploy_guest_sharing_rules
8:
task: create_fake_school_data
config_dev:
steps:
3:
task: deploy_permission_set
4:
task: deploy_site_config
5:
task: deploy_site_settings
6:
task: deploy_guest_permission_set
7:
task: deploy_guest_sharing_rules
8:
task: create_fake_school_data
config_dev_namespaced:
steps:
3:
task: deploy_permission_set
4:
task: deploy_site_config
5:
task: deploy_site_settings
6:
task: deploy_guest_permission_set
7:
task: deploy_guest_sharing_rules
8:
task: create_fake_school_data
customer_org:
steps:
1:
task: install_managed
plans:
install:
slug: install
title: Base Plan
tier: primary
is_listed: True
preflight_message: This will install Summit Events App (SEA) into your org.
post_install_message: "Thanks for installing SEA. Please review the [post-install instructions](https://sfdo-community-sprints.github.io/summit-events-app-documentation/docs/Getting-Started/Installing/) for next steps."
error_message: "If you experience an issue with the installation, please post in the [Trailblazer Community](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000kHi2SAE)."
steps:
1:
flow: customer_org
orgs:
scratch:
dev_namespaced:
config_file: orgs/namespaced.json
days: 7
namespaced: true