-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcumulusci.yml
705 lines (663 loc) · 25.7 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
minimum_cumulusci_version: 3.23.0
project:
name: Athena
package:
name: K-12 Architecture Kit
api_version: "48.0"
namespace: k12kit
install_class: STG_InstallScript
git:
default_branch: main
prefix_feature: feature/
prefix_beta: beta/
prefix_release: release/
repo_url: https://github.com/SalesforceFoundation/k12-architecture-kit
dependencies:
- github: "https://github.com/SalesforceFoundation/EDA"
source_format: sfdx
sources:
eda:
github: https://github.com/SalesforceFoundation/EDA
release: latest
latest_release:
github: https://github.com/SalesforceFoundation/k12-architecture-kit
release: latest
tasks:
add_application_type_picklist_values:
description: Adds additional picklist values to the Type field.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: hed__Application__c.hed__Application_Type__c
entries:
- fullName: "High School"
label: "High School"
add_before: "Transfer"
- fullName: "Middle School"
label: "Middle School"
add_before: "Transfer"
- fullName: "Elementary School"
label: "Elementary School"
add_before: "Graduate"
add_behavior_response_type_values:
description: Adds additional picklist values to the Type field.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: hed__Behavior_Response__c.hed__Type__c
entries:
- fullName: "Other"
label: "Other"
- fullName: "Expulsion"
label: "Expulsion"
add_before: "Other"
- fullName: "Academic Probation"
label: "Academic Probation"
add_before: "Expulsion"
- fullName: "Award"
label: "Award"
add_before: "Expulsion"
- fullName: "Detention"
label: "Detention"
add_before: "Expulsion"
- fullName: "Expulsion with Services"
label: "Expulsion with Services"
add_before: "Other"
- fullName: "In-School Suspension"
label: "In-School Suspension"
add_before: "Other"
- fullName: "Out-of-School Suspension"
label: "Out-of-School Suspension"
add_before: "Other"
- fullName: "Removal from Classroom"
label: "Removal from Classroom"
add_before: "Other"
- fullName: "Verbal Recognition"
label: "Verbal Recognition"
add_before: "Other"
add_case_category_values:
description: Adds additional picklist values to the Category field.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: Case.hed__Category__c
entries:
- fullName: "Other"
label: "Other"
- fullName: "State Offense"
label: "State Offense"
add_before: "Other"
- fullName: "School Violation"
label: "School Violation"
add_before: "State Offense"
- fullName: "School Code of Conduct"
label: "School Code of Conduct"
add_before: "School Violation"
- fullName: "Cooperation"
label: "Cooperation"
add_before: "School Code of Conduct"
- fullName: "Integrity"
label: "Integrity"
add_before: "School Code of Conduct"
- fullName: "Leadership"
label: "Leadership"
add_before: "School Code of Conduct"
- fullName: "Respect"
label: "Respect"
add_before: "School Code of Conduct"
- fullName: "Teamwork"
label: "Teamwork"
add_before: "Other"
- fullName: "Verbal Recognition"
label: "Verbal Recognition"
add_before: "Other"
add_case_location_values:
description: Adds additional picklist values to the Location field.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: Case.hed__Location__c
entries:
- fullName: "Other"
label: "Other"
- fullName: "On Campus"
label: "On Campus"
add_before: "Other"
- fullName: "Off Campus"
label: "Off Campus"
add_before: "On Campus"
- fullName: "Administrative Offices Area"
label: "Administrative Offices Area"
add_before: "Off Campus"
- fullName: "Athletic Field or Playground"
label: "Athletic Field or Playground"
add_before: "Off Campus"
- fullName: "Auditorium"
label: "Auditorium"
add_before: "Off Campus"
- fullName: "Bus Stop"
label: "Bus Stop"
add_before: "Off Campus"
- fullName: "Cafeteria Area"
label: "Cafeteria Area"
add_before: "Off Campus"
- fullName: "Classroom"
label: "Classroom"
add_before: "Off Campus"
- fullName: "Computer Lab"
label: "Computer Lab"
add_before: "Off Campus"
- fullName: "Hallway or Stairs"
label: "Hallway or Stairs"
add_before: "Off Campus"
- fullName: "Library/Media Center"
label: "Library/Media Center"
add_before: "Off Campus"
- fullName: "Locker Room or Gym Areas"
label: "Locker Room or Gym Areas"
add_before: "Off Campus"
- fullName: "Online"
label: "Online"
add_before: "On Campus"
- fullName: "Parking Lot"
label: "Parking Lot"
add_before: "Other"
- fullName: "Restroom"
label: "Restroom"
add_before: "Other"
- fullName: "School Bus"
label: "School Bus"
add_before: "Other"
- fullName: "Stadium"
label: "Stadium"
add_before: "Other"
- fullName: "Unknown"
label: "Unknown"
add_before: "Other"
- fullName: "Walking to or from School"
label: "Walking to or from School"
add_before: "Other"
add_behavior_involvement_values:
description: Adds additional picklist values to the Role field.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: hed__Behavior_Involvement__c.hed__Role__c
entries:
- fullName: "Other"
label: "Other"
- fullName: "Witness"
label: "Witness"
add_before: "Other"
- fullName: "Victim"
label: "Victim"
add_before: "Witness"
- fullName: "Reporter"
label: "Reporter"
add_before: "Victim"
- fullName: "Perpetrator"
label: "Perpetrator"
add_before: "Reporter"
- fullName: "Participant"
label: "Participant"
add_before: "Perpetrator"
add_relationship_picklist_values:
description: Adds additional picklist values to the Type field on the Relationship object.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: hed__Relationship__c.hed__Type__c
entries:
- fullName: "Guardian"
label: "Guardian"
- fullName: "Dependent"
label: "Dependent"
- fullName: "Stepfather"
label: "Stepfather"
- fullName: "Stepmother"
label: "Stepmother"
- fullName: "Stepparent"
label: "Stepparent"
- fullName: "Stepdaughter"
label: "Stepdaughter"
- fullName: "Stepson"
label: "Stepson"
- fullName: "Stepchild"
label: "Stepchild"
- fullName: "Foster Parent"
label: "Foster Parent"
- fullName: "Foster Daughter"
label: "Foster Daughter"
- fullName: "Foster Son"
label: "Foster Son"
- fullName: "Foster Child"
label: "Foster Child"
- fullName: "Parent's Sibling"
label: "Parent's Sibling"
add_before: "Cousin"
- fullName: "Niece"
label: "Niece"
add_before: "Cousin"
- fullName: "Nephew"
label: "Nephew"
add_before: "Cousin"
- fullName: "Sibling's Child"
label: "Sibiling's Child"
add_before: "Cousin"
add_contact_gender_picklist_values:
description: Adds additional picklist and record values to the gender field on the Contact object.
class_path: cumulusci.tasks.metadata_etl.picklists.AddPicklistEntries
group: "K-12: Metadata"
options:
picklists: Contact.hed__Gender__c
entries:
- fullName: "Decline to State"
label: "Decline to State"
record_types:
- "Faculty"
- "Guardian"
- "Student"
correct_affiliation_mappings:
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
options:
apex: >
delete [SELECT Id From hed__Affl_Mappings__c];
hed.STG_InstallScript.insertMappings();
correct_reciprocal_relationships:
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
options:
apex: >
delete [SELECT Id From hed__Relationship_Lookup__c];
hed.STG_InstallScript.insertRelationshipLookups();
deploy_k12_kit_settings:
description: Configure the default K-12 Architecture Kit Settings
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
group: "K-12: Custom Settings"
options:
path: scripts/configure_k12_kit.cls
apex: initializeK12KitSettings();
deploy_k12_app:
description: Deploys the K12 Kit App for those who use the installer rather than the trial
class_path: cumulusci.tasks.salesforce.Deploy
group: "K-12: Installer Tasks"
ui_options:
name: Deploy K12 Architecture Kit app tile
options:
path: unpackaged/config/installer
deploy_unpackaged_objects:
description: Deploys the K12 Kit Unpackaged Objects
class_path: cumulusci.tasks.salesforce.Deploy
group: "K-12: Installer Tasks"
ui_options:
name: Deploy K12 Architecture Kit Unpackaged Objects
options:
path: unpackaged/config/objects
deploy_trial_config:
description: Deploys metadata and configuration for TSOs.
class_path: cumulusci.tasks.salesforce.Deploy
group: "K-12: Trial"
ui_options:
name: Deploy Trial Metadata
options:
namespace_inject: $project_config.project__package__namespace
path: unpackaged/config/trial
enable_course_connections:
description: Enables course connections and sets default record types
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
group: "K-12: Custom Settings"
options:
path: scripts/configure_k12_kit.cls
apex: enableCourseConnections();
execute_k12_install_apex:
description: Runs most of the install script methods from the STG_InstallScript class
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
group: "K-12: Custom Settings"
options:
path: scripts/configure_k12_kit.cls
apex: executeK12InstallApex();
execute_eda_install_apex:
description: Runs most of the install script methods from the EDA STG_InstallScript class
class_path: cumulusci.tasks.apex.anon.AnonymousApexTask
group: "K-12: Custom Settings"
options:
path: scripts/configure_k12_kit.cls
apex: executeEDAInstallApex();
github_release_notes:
options:
trial_info: "`TBD`"
retrieve_postinstall_config:
description: Retrieves the current changes in a scratch org into unpackaged/post/config
class_path: cumulusci.tasks.salesforce.sourcetracking.RetrieveChanges
group: Salesforce Metadata
options:
path: unpackaged/post/config
namespace_tokenize: $project_config.project__package__namespace
retrieve_trial_config:
description: Retrieves the current changes in a scratch org into unpackaged/post/trial
class_path: cumulusci.tasks.salesforce.sourcetracking.RetrieveChanges
group: Salesforce Metadata
options:
path: unpackaged/config/trial
namespace_tokenize: $project_config.project__package__namespace
uninstall_packaged_incremental:
description: Deletes any metadata from the package in the target org not in the local workspace
class_path: cumulusci.tasks.salesforce.UninstallPackagedIncremental
options:
ignore:
QuickAction:
- LogACall
- NewCase
- NewContact
- NewEvent
- NewLead
- NewNote
- NewTask
- SendEmail
update_admin_profile:
description: Retrieves, edits, and redeploys the Admin.profile with full FLS perms for all objects/fields
class_path: tasks.salesforce.UpdateAdminProfile
robot:
# description: Runs a Robot Framework test from a .robot file.
options:
suites: robot/K12/tests/browsers/
options:
outputdir: robot/K12/results
robot_testdoc:
# description: Generates html documentation of your Robot test suite and writes to tests/test_suite.
options:
path: robot/K12/tests/browsers/
output: robot/K12/doc/K12_tests.html
robot_libdoc:
# description: Generates documentation for project keyword files.
options:
output: robot/K12/doc/Keywords.html
path:
- robot/K12/resources/*PageObject.py
- robot/K12/resources/K12.py
- robot/K12/resources/K12.robot
flows:
add_k12_picklist_values:
steps:
1:
task: add_application_type_picklist_values
ui_options:
name: K-12 Architecture Kit - Add Application Type Picklist Values
2:
task: add_behavior_response_type_values
ui_options:
name: K-12 Architecture Kit - Add Behavior Response Type Picklist Values
3:
task: add_case_category_values
ui_options:
name: K-12 Architecture Kit - Add Case Category Type Picklist Values
4:
task: add_case_location_values
ui_options:
name: K-12 Architecture Kit - Add Case Location Type Picklist Values
5:
task: add_behavior_involvement_values
ui_options:
name: K-12 Architecture Kit - Add Behavior Involvement Role Picklist Values
6:
task: add_relationship_picklist_values
ui_options:
name: K-12 Architecture Kit - Add Relationship Type Picklist Values
7:
task: add_contact_gender_picklist_values
ui_options:
name: K-12 Architecture Kit - Add Contact Gender Picklist and RecordType Values
ci_feature_eda:
steps:
1:
flow: dependencies
options:
update_dependencies:
include_beta: True
2:
flow: deploy_unmanaged
3:
flow: config_apextest
4:
task: run_tests
options:
managed: True
namespace: hed
config_2gp:
steps:
1:
task: update_admin_profile
2:
task: execute_eda_install_apex
3:
task: execute_k12_install_apex
4:
flow: config_unmanaged
5:
flow: config_regression
config_managed:
steps:
3:
task: deploy_k12_kit_settings
config_regression:
steps:
1:
flow: None
2:
task: deploy_post
when: "'k12kit' in org_config.installed_packages"
3:
task: deploy_k12_kit_settings
when: "'k12kit' in org_config.installed_packages"
4:
task: enable_course_connections
when: "'k12kit' in org_config.installed_packages"
5:
task: deploy_trial_config
when: "'k12kit' in org_config.installed_packages"
6:
task: deploy_k12_app
when: "'k12kit' in org_config.installed_packages"
7:
task: update_admin_profile
when: "'k12kit' in org_config.installed_packages"
dependencies:
steps:
2:
task: None
3:
flow: add_k12_picklist_values
4:
task: deploy_pre
config_unmanaged:
steps:
1:
task: execute_k12_install_apex
when: "'k12kit' not in org_config.installed_packages"
2:
task: enable_course_connections
when: "'k12kit' not in org_config.installed_packages"
3:
task: deploy_trial_config
when: "'k12kit' not in org_config.installed_packages"
4:
task: deploy_k12_kit_settings
when: "'k12kit' not in org_config.installed_packages"
config_dev:
steps:
3:
flow: config_unmanaged
config_qa:
steps:
3:
flow: config_unmanaged
4:
flow: config_regression
dev_org_namespaced:
description: Set up a namespaced scratch org as a development environment for unmanaged metadata
steps:
1:
flow: dependencies
2:
flow: deploy_unmanaged
3:
flow: config_dev
8:
task: snapshot_changes
net_new_org:
description: Simulates an K12 installation for a new customer. Installs the latest beta and dependencies.
steps:
1:
flow: dependencies
options:
update_dependencies:
include_beta: True
2:
task: install_managed_beta
3:
flow: config_managed
4:
task: enable_course_connections
5:
task: deploy_trial_config
qa_org_2gp:
steps:
2:
flow: config_2gp
trial_org:
description: Deploy trial configuration to an org.
group: "K-12: Trial"
steps:
1:
flow: dependencies
2:
task: install_managed
3:
flow: config_managed
4:
flow: eda:eda_settings
options:
execute_enable_course_connections:
apex: >
Schema.DescribeSObjectResult courseEnrollmentSchema = Schema.SObjectType.hed__Course_Enrollment__c;
Map<String,Schema.RecordTypeInfo> rtInfosByDeveloperName = courseEnrollmentSchema.getRecordTypeInfosByDeveloperName();
hed__Hierarchy_Settings__c settings = hed__Hierarchy_Settings__c.getOrgDefaults();
settings.put('hed__Enable_Course_Connections__c', true);
settings.put('hed__Student_RecType__c', rtInfosByDeveloperName.get('Student').getRecordTypeId());
settings.put('hed__Faculty_RecType__c', rtInfosByDeveloperName.get('Faculty').getRecordTypeId());
upsert settings;
5:
task: eda:add_citizenship_status_values
6:
task: deploy_trial_config
7:
task: correct_reciprocal_relationships
8:
task: correct_affiliation_mappings
upgraded_org:
description: Simulate an existing org. Used to test the state of a customer's org after a push upgrade.
steps:
1:
flow: latest_release:dependencies
2:
task: install_managed
3:
flow: latest_release:config_regression
4:
task: update_dependencies
options:
include_beta: True
5:
task: install_managed_beta
6:
task: snapshot_changes
customer_org:
steps:
1:
task: update_dependencies
ui_options:
1:
name: EDA - Account Record Types
2:
name: EDA - Contact Key Affiliation Fields
4:
name: EDA - Deploy Case Behavior Record Types
5:
name: EDA - Deploy Course Connection Record Types
6:
name: EDA - Education Data Architecture App
7:
name: EDA - Facility Display Name Formula Field
2:
flow: add_k12_picklist_values
3:
task: deploy_pre
options:
unmanaged: False
ui_options:
recordtypes:
name: K-12 Architecture Kit - Account and Contact Record Types
4:
task: install_managed
5:
task: deploy_post
options:
unmanaged: False
ui_options:
config:
name: K-12 Architecture Kit Metadata and Configuration
6:
task: deploy_unpackaged_objects
ui_options:
name: Deploy K-12 Architecture Kit Unpackaged Objects
is_required: False
is_recommended: False
7:
task: deploy_k12_app
ui_options:
name: Deploy K-12 Architecture Kit App Tile
plans:
install:
slug: install
title: Install K-12 Architecture Kit
tier: primary
checks:
- when: "not tasks.check_my_domain_active()"
action: error
message: "Please enable My Domain in your org prior to installing."
- when: "not tasks.check_chatter_enabled()"
action: error
message: "Please enable Chatter in your org prior to installing."
steps:
1:
flow: customer_org
upgrade:
slug: upgrade
title: Product Upgrade
tier: additional
is_listed: False
preflight_message: "This installer upgrades this package and any required dependencies to the latest version in your org. This installer isn't supported and has risks. Please don't run this installer unless you're aware of its specific use cases and considerations."
post_install_message: "Installation complete and package is on the latest version."
steps:
1:
task: update_dependencies
options:
security_type: PUSH
packages_only: True
2:
task: install_managed
options:
security_type: PUSH
orgs:
scratch:
dev_namespaced:
config_file: orgs/dev.json
namespaced: True
prerelease:
config_file: orgs/prerelease.json
prerelease_namespaced:
config_file: orgs/prerelease.json
namespaced: True
regression:
config_file: orgs/regression.json
trial:
config_file: orgs/trial.json