Setting Up A Developer Environment with CCI - pogilvie/OutboundFundsNPSP GitHub Wiki
Requirements
- At the end of the process we should have a functional NPSP managed package installation. NPSP opportunity record types should installed.
- At the end of the installation we should have a functional Outbound funds managed package installation. Fields and formulas installed by the package should be visible to code on the target code.
- Source from outbound funds should be installed and ready for managed package development
- Should have a process to push source from a local git repo to to a target scratch org
- Should have a process to pull source from a target scratch org to a local git repo
Assumptions
- Developer is on a unix like environment (Mac or Linux)
Prerequisites
- Working CCI installation
- Working git installation
- Working Salesforce cli installation
Steps
- Source CCI environment (Here cci is install in a directory in the ~/Projects directory
pogilvie::~/Projects-> source cci/bin/activate
(cci) pogilvie::~/Projects->
- Clone the OutboundFundsNPSP repo
(cci) pogilvie::~/Projects-> git clone https://github.com/pogilvie/OutboundFundsNPSP.git
Cloning into 'OutboundFundsNPSP'...
remote: Enumerating objects: 111, done.
remote: Counting objects: 100% (111/111), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 290 (delta 73), reused 83 (delta 45), pack-reused 179
Receiving objects: 100% (290/290), 48.70 KiB | 1.19 MiB/s, done.
Resolving deltas: 100% (157/157), done.
- Check out a development branch
git checkout pogilvie-manage-disbursements-component
Branch 'pogilvie-manage-disbursements-component' set up to track remote branch 'pogilvie-manage-disbursements-component' from 'origin'.
Switched to a new branch 'pogilvie-manage-disbursements-component'
- list cci orgs
cci org list
Checking the version!
org default scratch days expired config_name username
-------------- ------- ------- ------- ------- -------------- -----------------------------
beta * 1 beta
dev * * 27 of 7 * dev [email protected]
dev_namespaced * 7 dev_namespaced
feature * 1 feature
release * 39 of 1 * release [email protected]
(cci) pogilvie: (pogilvie-manage-disbursements-component):~/Projects/scratch/OutboundFundsNPSP->
- refresh dev if it's expired
cci org info dev
Checking the version!
The scratch org is expired
Attempt to recreate the scratch org? [Y/n]:
Org config was refreshed, attempting to recreate scratch org
2019-02-03 14:41:25: Creating scratch org with command sfdx force:org:create -f orgs/dev.json -n --durationdays 7 -a "OutboundFundsNPSP__dev"
2019-02-03 14:44:46: Successfully created scratch org: 00D3F00000011J6UAI, username: [email protected]
2019-02-03 14:44:46: Getting scratch org info from Salesforce DX
config_file: orgs/dev.json
days: 7
set_password: False
scratch: True
namespaced: False
config_name: dev
sfdx_alias: OutboundFundsNPSP__dev
scratch_org_type: workspace
org_id: 00D3F00000011J6
username: [email protected]
date_created: 2019-02-03 14:44:46.756748
created: True
instance_url: https://innovation-business-4593-dev-ed.cs92.my.salesforce.com/
access_token: 00D3F00000011J6!AQEAQPM1.32eSDmdAPs1L_vMJgYfLohSH0SwgEivkmX0DezgPYmatZ0XvdUpz6xkrvhn2HwUa2.JOpeW69WjV_NTXeK.skPF
password: None
Org expires on Sun Feb 10 14:44:46 2019
- Set dev as the default org
cci org default dev
Checking the version!
dev is now the default org
- checkout master and run the dev_org flow (takes about 45min to run)
git checkout master
cci flow run dev_org
Checking the version!
2019-02-03 14:56:18: ---------------------------------------
2019-02-03 14:56:18: Initializing flow: dev_org
2019-02-03 14:56:18: ---------------------------------------
2019-02-03 14:56:18:
2019-02-03 14:56:18: Verifying and refreshing credentials for target org dev
2019-02-03 14:56:18: Getting scratch org info from Salesforce DX
2019-02-03 14:56:26: Flow Description: Set up an org as a development environment for unmanaged metadata
2019-02-03 14:56:26: Steps:
2019-02-03 14:56:26: (Flow) dependencies: Deploy dependencies to prepare the org environment for the package metadata
2019-02-03 14:56:26: (Flow) deploy_unmanaged: Deploy the unmanaged metadata from the package
2019-02-03 14:56:26: (Flow) config_dev: Configure an org for use as a dev org after package metadata is deployed
2019-02-03 14:56:26: Organization:
2019-02-03 14:56:26: Username: [email protected]
2019-02-03 14:56:26: Org Id: 00D3F00000011J6
2019-02-03 14:56:26: ---------------------------------------
2019-02-03 14:56:26: Initializing flow: dependencies
2019-02-03 14:56:26: ---------------------------------------
2019-02-03 14:56:26:
2019-02-03 14:56:26: Flow Description: Deploy dependencies to prepare the org environment for the package metadata
2019-02-03 14:56:26: Steps:
2019-02-03 14:56:26: update_dependencies: Installs all dependencies in project__dependencies into the target org
2019-02-03 14:56:26: deploy_pre: Deploys all metadata bundles under unpackaged/pre/
2019-02-03 14:56:26: Organization:
2019-02-03 14:56:26: Username: [email protected]
2019-02-03 14:56:26: Org Id: 00D3F00000011J6
2019-02-03 14:56:26: Options:
2019-02-03 14:56:26: dependencies: [OrderedDict([('github', 'https://github.com/SalesforceFoundation/Cumulus')]), OrderedDict([('github', 'https://github.com/SalesforceFoundation/OutboundFunds')])]
2019-02-03 14:56:26: namespaced_org: False
2019-02-03 14:56:26: purge_on_delete: True
2019-02-03 14:56:26: include_beta: False
2019-02-03 14:56:26:
2019-02-03 14:56:26: Running task: update_dependencies
2019-02-03 14:56:26: Beginning task: UpdateDependencies
2019-02-03 14:56:26:
2019-02-03 14:56:26: Preparing static dependencies map
2019-02-03 14:56:26: Processing dependencies from Github repo https://github.com/SalesforceFoundation/Cumulus
2019-02-03 14:56:34: Processing dependencies from Github repo https://github.com/SalesforceFoundation/Households
2019-02-03 14:56:35: Processing dependencies from Github repo https://github.com/SalesforceFoundation/Contacts_and_Organizations
2019-02-03 14:56:36: Processing dependencies from Github repo https://github.com/SalesforceFoundation/Recurring_Donations
2019-02-03 14:56:52: Processing dependencies from Github repo https://github.com/SalesforceFoundation/Relationships
- Attempt to build test factory class on scratch org (with an without namespace)
export user=OutboundFundsNPSP__dev
~/Projects/scratch/OutboundFundsNPSP-> make -e factory
sfdx force:source:deploy -p ./src/classes/Factory.cls -u OutboundFundsNPSP__dev
PROJECT PATH ERROR
─────────────────────── ──────────────────────────────────────────────────────────────────────────────────────
src/classes/Factory.cls DML requires SObject or SObject list type: outfundsnpspext__GAU_Expenditure__c (109:9)
src/classes/Factory.cls Invalid type: **outfundsnpspext__GAU_Expenditure__c** (104:9)
src/classes/Factory.cls Variable does not exist: ex (111:16)
make: *** [factory] Error 1
~/Projects/scratch/OutboundFundsNPSP-> make -e factory
sfdx force:source:deploy -p ./src/classes/Factory.cls -u OutboundFundsNPSP__dev
PROJECT PATH ERROR
─────────────────────── ─────────────────────────────────────────────────────────────────────
src/classes/Factory.cls Invalid type: **GAU_Expenditure__c** (104:9)
src/classes/Factory.cls Variable does not exist: ex (111:16)
src/classes/Factory.cls DML requires SObject or SObject list type: GAU_Expenditure__c (109:9)
