-
Notifications
You must be signed in to change notification settings - Fork 0
/
cumulusci.yml
109 lines (97 loc) · 4.09 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
minimum_cumulusci_version: '3.73.0'
project:
name: Summit-Events-App-TouchNet
package:
name: Summit-Events-App-TouchNet
api_version: '57.0'
dependencies:
- github: 'https://github.com/SFDO-Community/Summit-Events-App.git'
git:
default_branch: 'main'
source_format: sfdx
sources:
sea:
github: 'https://github.com/SFDO-Community/Summit-Events-App'
tasks:
robot:
options:
suites: robot/Summit-Events-App-As-Depencency/tests
options:
outputdir: robot/Summit-Events-App-As-Depencency/results
robot_testdoc:
options:
path: robot/Summit-Events-App-As-Depencency/tests
output: robot/Summit-Events-App-As-Depencency/doc/Summit-Events-App-As-Depencency_tests.html
run_tests:
options:
required_org_code_coverage_percent: 75
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
unmanaged: True
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;
summit__Summit_Events_Settings__c eventSettings = summit__Summit_Events_Settings__c.getOrgDefaults();
eventSettings.summit__Community_Base_URL__c = url;
eventSettings.summit__Managed_Package__c = true;
upsert eventSettings;
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;
}
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
unmanaged: True
create_fake_school_data:
description: Makes fake account data to mimic schools with Educaiton as industry
class_path: cumulusci.tasks.bulkdata.snowfakery.Snowfakery
options:
recipe: datasets/snowfackery/school_recipe.yml
flows:
config_dev:
steps:
3:
task: sea: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
9:
task: sea:load_sample_data