Before packaging make sure your master branch has everything in it you want to include in the package for installation.
-
Deploy to scratch org. This will create a dev scratch org that installs all dependencies (EDA in this case).
cci flow run dev_org
-
Check your dev org and make sure the app works
cci org browser dev
-
Deploy your master to the packaging org
cci flow run ci_master --org packaging
-
Release production in the packaging org
cci flow run release_production --org packaging
-
Initially you will have to upload via the packaging org upload button to get your install link. This appears to only have to be done once and is a step I missed.
-
Connect the org you want to deploy to:
cci org connect <org_name>
Example staging:
cci org connect staging
Example production:
cci org connect production
-
Deploy code straight to a defined org
First rebuild the root src so it reflects any changes made. Note: The src directory should have been rebuilt if you have deployed to a scratch org like you should have.
cci task run dx_convert_from
Now deploy the src directory to the org of your choice.
cci task run deploy --org <org_name>
Anonymous Apex in run cci to add settings / data ?
Run this command to list all orgs currently running:
cci org list
Run this command to delete a scratch org (in this case the dev org)
Note: Deleting a scratch org will still leave the lazy configuration in the keychain so the scratch org can easily be created again by running the dev_org
flow.
cci org scratch_delete dev
Run this command to remove a scratch org from the org listing (in this case the dev org)
cci org remove dev
Run this command to build a new dev org from your local repository
This cci command is a flow. A flow is a combination of tasks run in order. This flow will install all dependencies as well as your local repositories code.
cci flow run dev_org
Run this command to update your package before running the dev_org flow
I ran into issues with the flow erroring out when I didn't do it. I ended up having to delete the dev org and running the following to update the package. Then it all worked!
cci task run update_package_xml
Run this command if your package didn't install after running the dev_org
flow
cci task run deploy
Run this command to open a scrach org in a browser (in this case dev)
If you did the above your application should be installed:
cci org browser dev
Run this command after you complete building your dev org take a snapshot of the changes (there should be none at this point)
cci task run list_changes -o snapshot True
Run this command to list out any new changes to your project
cci task run list_changes
Run this command when you are ready to pull down new changes
cci task run retrieve_changes
Occasionally, especially if a org creation is interrupted or fails, multiple scratch orgs can be created. You will need to list using Salesforce CLI the orgs and then delete them using that CLI.
List the orgs:
sfdx force:org:list
Delete orgs stray orgs that aren't listed in CCI (cci list orgs):
sfdx force:org:delete -u [email protected]
The [email protected] should match the user of the org you are trying to delete.
I found a typo in a field name.. gross! Since this is repository first coding I should be able to just globally change it and update my org. Your code can be 100% changed but then during org creation the directory .sfx/orgs/[email protected] (that last bit is different per org) the source path info will still be old and include the old field name. Why?!
Not sure I need to do this. Is this for .gitignore or .forceignore
force-app/main/default/objects/Contact/fields/hed__**