Packaging utility for Salesforce professionals
Packaging utility for Salesforce professionals - Fabrice Cathala đ¸
fabAnt is a script wrapper of Salesforce Ant Toolkit used to deploy from org to org, and sooner or later to production. Itâs based on Ant that it simplifies and documents. Salesforce release management currently requires a client to temporarly store the metadata to be shipped between orgs. There are no way do do an equivalent operation in the clouds.
Typically you send to the source the name of the components that you need (or a package hosted on the org and that describes them) and then the org send them back to you as they are configured. Of course, classes would contain heavily customized code (that you cannot guess) but most components are also available for description (and migration/deployment). Having said that, Salesforce is renowned for skipping support of some metadata types (although, to be accurate, whatâs available in change Set and whatâs available in the metadata API is not the same thing). You do need to be careful about this area of an org configuration that require manual-pre and manual-post deployment checklists.
fabAnt will not remove the Salesforce native challenges to release management but will simplify their management by freeing you time to focus on these challenges and automate the easy part of the process.
Although you may argue that this is a painful step, requiring computer troubleshooting at times, itâs also a one-off thing to do to accomodate your computer to this way of working with Salesforce orgs.
To run fabAnt you must have the following installed on your computer:
In the first versions (v1.x) I was trying to limit the number of installation to a single Salesforce Toolkit per computer (as there is a single install of Java or Ant). In the following versions, I have changed this architecture to come bak to something simpler to use. As a result there will be quite a few duplicates but Salesforce manages old versions quite well, so no need to be stressed about that. An install is now Project Centric and within a Project each folder must represent a pair of source and destination orgs. Example for a 3 orgs structure, you would have to configure your folders this way:
C:\USERS\<YOUR_NAME>\<PROJECT_NAME>\DEV-QA
â â fabAnt.cmd
â ââââjar
â â ant-salesforce.jar
â ââââlib
â deployCode.cmd
â deployCodeCheckOnly.cmd
â describeMetadata.cmd
â fabAnt.xml
â org.down.properties
â org.up.properties
â retrieveCode.cmd
â retrievePkg.cmd
â testInstallation.cmd
â undeployCode.cmd
â
ââââQA-SIT
â â fabAnt.cmd
â ââââjar
â â ant-salesforce.jar
â ââââlib
â deployCode.cmd
â deployCodeCheckOnly.cmd
â describeMetadata.cmd
â fabAnt.xml
â org.down.properties
â org.up.properties
â retrieveCode.cmd
â retrievePkg.cmd
â testInstallation.cmd
â undeployCode.cmd
â
ââââSIT-PROD
ant-salesforce.jar
ââââjar
â ant-salesforce.jar
ââââlib
deployCode.cmd
deployCodeCheckOnly.cmd
describeMetadata.cmd
fabAnt.xml
org.down.properties
org.up.properties
retrieveCode.cmd
retrievePkg.cmd
testInstallation.cmd
undeployCode.cmd
fabAnt really is just a script, wrapping all Ant calls into a simplified interface. Who say âsimplified interfaceâ says âless powerfulâ, so it may be the case that you have to learn the whole Ant approach but at least this repo gives you an head start. Strangely version 1.x was more powerful but it was also more complex to hack into, so I decided to simplify the approach. Also, Iâm wroking into a CLI DX version, but this is not going to be the magical solution to move an org from a Production centric to Repository centric approach of Enterprise-Class application lifecycle management. Iâll do my best to simplify things again.
----------------------------------------------------------
fabPack - Packaging Utility for Salesforce Professionals
----------------------------------------------------------
(1) Check installation
(2) Retrieve all supported metadata types
(3) Download components from manifest
(4) Download components from the package
(5) Validate components on the target
(6) Deploy components on the target
(7) Delete components on the target
(8) Quit
----------------------------------------------------------
Please, type the selection number from 1 to 8.
Validate the whole stack is correctly installed. Show some Environment Variable that are always good to check.
Create a folder âmetadata\archive\%TimeStamp%-describeMetadataâ including the result file âlog.txtâ which contains the list of all metadata components supposed to be touched, hence requiring migration. (this bit remains âTo Be Clarifiedâ)
Use the âpackage.xmlâ stored in the âmetadata\tempâ folder to retrieve and download all components listed there. Download these components into the folder âmetadata\tempâ including the descriptif âpackage.xmlâ. When done, create a folder âmetadata\archive\%TimeStamp%-retrieveCodeâ including the result file âlog.txtâ.
Use the package name described in âorg.down.propertiesâ (example: #sf.pkgName = DailyCS) to retrieve and download all components listed there. Download these components into the folder âmetadata\tempâ including the descriptif âpackage.xmlâ. When done, create a folder âmetadata\archive\%TimeStamp%-retrievePkgâ including the result file âlog.txtâ.
Expect to find in the âmetadata\tempâ folder the file âpackage.xmlâ and associated subfolder containing the components to deploy. Then, DO NOT deploy but only tests the deployment can happen without fault. When done, create a folder âmetadata\archive\%TimeStamp%-deployCodeCheckOnlyâ including the result file âlog.txtâ.
Expect to find in the âmetadata\tempâ folder the file âpackage.xmlâ and associated subfolder containing the components to deploy. When done, create a folder âmetadata\archive\%TimeStamp%-deployCodeâ including the result file âlog.txtâ and a copy of the metadata just deployed.
Expect to find in the âmetadata\tempâ folder the files âdestructiveChanges.xmlâ and âpackage.xmlâ containing the components to remove and, optionaly, the ones to deploy afterward. When done, create a folder âmetadata\archive\%TimeStamp%-undeployCodeâ including the result file âlog.txtâ.
Leave fabAnt.