diff --git a/CHANGELOG.md b/CHANGELOG.md index f60e84408..837398fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta` +- Update documentation + ## [4.6.4] 2023-09-28 - hardis:work:save : Fix issue when there is an empty commit because of pre-commit hooks diff --git a/README.md b/README.md index 4f2c2c4df..0e165dae1 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ It will allow you to: [![VsCode SFDX Hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/extension-demo.gif)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis) - +_See Dreamforce presentation_ + +[![See Dreamforce presentation](https://img.youtube.com/vi/o0Mm9F07UFs/0.jpg)](https://www.youtube.com/watch?v=o0Mm9F07UFs) ## Installation @@ -989,7 +991,7 @@ DESCRIPTION - listViewsMine ``` - - Example of sfdx-hardis.yml property `listViewsToSetToMine`: +- Example of sfdx-hardis.yml property `listViewsToSetToMine`: ```yaml listViewsToSetToMine: @@ -1001,7 +1003,7 @@ DESCRIPTION - "force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml" ``` - - If manually written, this could also be: +- If manually written, this could also be: ```yaml listViewsToSetToMine: @@ -1013,7 +1015,7 @@ DESCRIPTION - "Account:MyActivePartners" ``` - Troubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your + Troubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile: ```dockerfile @@ -1037,8 +1039,8 @@ Generates full org package.xml, including managed items ``` USAGE - $ sfdx hardis:org:generate:packagexmlfull [--outputfile ] [-d] [--websocket ] [--skipauth] [-u - ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:generate:packagexmlfull [--outputfile ] [-d] [--websocket ] [--skipauth] [-u + ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1077,7 +1079,7 @@ Purge apex logs in selected org ``` USAGE - $ sfdx hardis:org:purge:apexlog [-z] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] + $ sfdx hardis:org:purge:apexlog [-z] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1116,8 +1118,8 @@ Purge Obsolete flow versions to avoid the 50 max versions limit. Filters on Stat ``` USAGE - $ sfdx hardis:org:purge:flow [-z] [-n ] [-s ] [-f] [-r ] [-d] [--websocket ] - [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:purge:flow [-z] [-n ] [-s ] [-f] [-r ] [-d] [--websocket ] + [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1166,7 +1168,7 @@ EXAMPLES ID MASTERLABEL VERSIONNUMBER DESCRIPTION STATUS 30109000000kX7uAAE TestFlow 2 test flowwww Obsolete - $ sfdx hardis:org:purge:flow --targetusername nicolas.vuillamy@gmail.com --status "Obsolete,Draft,InvalidDraft --name + $ sfdx hardis:org:purge:flow --targetusername nicolas.vuillamy@gmail.com --status "Obsolete,Draft,InvalidDraft --name TestFlow" Found 4 records: ID MASTERLABEL VERSIONNUMBER DESCRIPTION STATUS @@ -1186,7 +1188,7 @@ Retrieve package configuration from an org ``` USAGE - $ sfdx hardis:org:retrieve:packageconfig [-d] [--websocket ] [--skipauth] [-u ] [--apiversion + $ sfdx hardis:org:retrieve:packageconfig [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1222,7 +1224,7 @@ Retrieve all CRM Analytics sources from an org, with workarounds for SFDX bugs ``` USAGE - $ sfdx hardis:org:retrieve:sources:analytics [-d] [--websocket ] [--skipauth] [-u ] [--apiversion + $ sfdx hardis:org:retrieve:sources:analytics [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1257,8 +1259,8 @@ Retrieve Salesforce DX project from org ``` USAGE - $ sfdx hardis:org:retrieve:sources:dx [-f ] [-t ] [-k ] [-m ] [-o] [-r ] [-d] - [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:retrieve:sources:dx [-f ] [-t ] [-k ] [-m ] [-o] [-r ] [-d] + [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1308,8 +1310,8 @@ Retrieve Salesforce DX project from org ``` USAGE - $ sfdx hardis:org:retrieve:sources:dx2 [-x ] [-t ] [-d] [--websocket ] [--skipauth] [-u - ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:retrieve:sources:dx2 [-x ] [-t ] [-d] [--websocket ] [--skipauth] [-u + ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1349,8 +1351,8 @@ Retrieve Salesforce DX project from org ``` USAGE - $ sfdx hardis:org:retrieve:sources:metadata [-f ] [-p ] [--includemanaged] [-r ] [-d] - [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:retrieve:sources:metadata [-f ] [-p ] [--includemanaged] [-r ] [-d] + [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1391,9 +1393,9 @@ Retrieve changes from org link to a ref branch not present in sources ``` USAGE - $ sfdx hardis:org:retrieve:sources:retrofit [--commit] [--commitmode updated|all] [--push] [--pushmode - default|mergerequest] [--productionbranch ] [--retrofittargetbranch ] [-d] [--websocket ] - [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:retrieve:sources:retrofit [--commit] [--commitmode updated|all] [--push] [--pushmode + default|mergerequest] [--productionbranch ] [--retrofittargetbranch ] [-d] [--websocket ] + [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1442,8 +1444,8 @@ OPTIONS Hardis UI integration DESCRIPTION - This command need to be triggered from a branch that is connected to a SF org. It will then retrieve all changes not - present in that branch sources, commit them and create a merge request against the default branch. If a merge request + This command need to be triggered from a branch that is connected to a SF org. It will then retrieve all changes not + present in that branch sources, commit them and create a merge request against the default branch. If a merge request already exists, it will simply add a new commit. Define the following properties in **.sfdx-hardis.yml** @@ -1496,7 +1498,7 @@ DESCRIPTION EXAMPLES $ sfdx hardis:org:retrieve:sources:retrofit sfdx hardis:org:retrieve:sources:retrofit --productionbranch master --commit --commitmode updated - sfdx hardis:org:retrieve:sources:retrofit --productionbranch master --retrofitbranch preprod --commit --commitmode + sfdx hardis:org:retrieve:sources:retrofit --productionbranch master --retrofitbranch preprod --commit --commitmode updated --push --pushmode mergerequest ``` @@ -1508,7 +1510,7 @@ Interactive org selection for user ``` USAGE - $ sfdx hardis:org:select [-h] [-s] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:org:select [-h] [-s] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1541,8 +1543,8 @@ Run apex tests in Salesforce org ``` USAGE - $ sfdx hardis:org:test:apex [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-d] [--websocket - ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:test:apex [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-d] [--websocket + ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1572,8 +1574,8 @@ OPTIONS DESCRIPTION If following configuration is defined, it will fail if apex coverage target is not reached: - - Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` - - Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` +- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` +- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` You can override env var SFDX_TEST_WAIT_MINUTES to wait more than 60 minutes @@ -1589,7 +1591,7 @@ Update sandbox users so their email is valid ``` USAGE - $ sfdx hardis:org:user:activateinvalid [-p ] [-d] [--websocket ] [--skipauth] [-u ] + $ sfdx hardis:org:user:activateinvalid [-p ] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1622,14 +1624,14 @@ DESCRIPTION See article below - [![Reactivate all the sandbox users with .invalid emails in 3 + [![Reactivate all the sandbox users with .invalid emails in 3 clicks](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-email.jpg)](https:// nicolas.vuillamy.fr/reactivate-all-the-sandbox-users-with-invalid-emails-in-3-clicks-2265af4e3a3d) EXAMPLES $ sfdx hardis:org:user:activateinvalid $ sfdx hardis:org:user:activateinvalid --targetusername myuser@myorg.com - $ sfdx hardis:org:user:activateinvalid --profiles 'System Administrator,MyCustomProfile' --targetusername + $ sfdx hardis:org:user:activateinvalid --profiles 'System Administrator,MyCustomProfile' --targetusername myuser@myorg.com ``` @@ -1641,8 +1643,8 @@ Mass freeze users in org before a maintenance or go live ``` USAGE - $ sfdx hardis:org:user:freeze [-n ] [-p ] [-e ] [-m ] [-d] [--websocket ] - [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:user:freeze [-n ] [-p ] [-e ] [-m ] [-d] [--websocket ] + [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1681,7 +1683,7 @@ DESCRIPTION - [![How to freeze / unfreeze users during a Salesforce + [![How to freeze / unfreeze users during a Salesforce deployment](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-freeze.jpg)](https://med ium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3) @@ -1700,8 +1702,8 @@ Mass unfreeze users in org after a maintenance or go live ``` USAGE - $ sfdx hardis:org:user:unfreeze [-n ] [-p ] [-e ] [-m ] [-d] [--websocket ] - [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:org:user:unfreeze [-n ] [-p ] [-e ] [-m ] [-d] [--websocket ] + [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1740,7 +1742,7 @@ DESCRIPTION - [![How to freeze / unfreeze users during a Salesforce + [![How to freeze / unfreeze users during a Salesforce deployment](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-freeze.jpg)](https://med ium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3) @@ -1759,7 +1761,7 @@ Create a new package ``` USAGE - $ sfdx hardis:package:create [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] + $ sfdx hardis:package:create [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1794,7 +1796,7 @@ Install a package in an org using its id (starting with **04t**) ``` USAGE - $ sfdx hardis:package:install [-p ] [-d] [--websocket ] [-k ] [--skipauth] [-u ] + $ sfdx hardis:package:install [-p ] [-d] [--websocket ] [-k ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1838,7 +1840,7 @@ Select and merge package.xml files ``` USAGE - $ sfdx hardis:package:mergexml [-f ] [-p ] [-x ] [-r ] [--websocket ] + $ sfdx hardis:package:mergexml [-f ] [-p ] [-x ] [-r ] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1850,7 +1852,7 @@ OPTIONS -r, --result=result Result package.xml file name - -x, --pattern=pattern [default: /**/*package*.xml] Name + -x, --pattern=pattern [default: /**/_package_.xml] Name criteria to list package.xml files --json format output as json @@ -1867,7 +1869,7 @@ OPTIONS EXAMPLES $ sfdx hardis:package:mergexml $ sfdx hardis:package:mergexml --folder packages --pattern /**/*.xml --result myMergedPackage.xml - $ sfdx hardis:package:mergexml --packagexmls "config/mypackage1.xml,config/mypackage2.xml,config/mypackage3.xml" + $ sfdx hardis:package:mergexml --packagexmls "config/mypackage1.xml,config/mypackage2.xml,config/mypackage3.xml" --result myMergedPackage.xml ``` @@ -1879,8 +1881,8 @@ Create a new version of an unlocked package ``` USAGE - $ sfdx hardis:package:version:create [-d] [-p ] [-k ] [--deleteafter] [-i] [--websocket ] - [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:package:version:create [-d] [-p ] [-k ] [--deleteafter] [-i] [--websocket ] + [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1927,7 +1929,7 @@ List versions of unlocked package ``` USAGE - $ sfdx hardis:package:version:list [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:package:version:list [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -1962,7 +1964,7 @@ Promote package(s) version(s): convert it from beta to released ``` USAGE - $ sfdx hardis:package:version:promote [-d] [-d] [--websocket ] [--skipauth] [-v ] [--apiversion + $ sfdx hardis:package:version:promote [-d] [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2001,7 +2003,7 @@ Audit API version ``` USAGE - $ sfdx hardis:project:audit:apiversion [-m ] [-f] [-d] [--websocket ] [--skipauth] [--json] + $ sfdx hardis:project:audit:apiversion [-m ] [-f] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2036,7 +2038,7 @@ Generate list of callIn and callouts from sfdx project ``` USAGE - $ sfdx hardis:project:audit:callincallout [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:audit:callincallout [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2096,7 +2098,7 @@ Generate list of remote sites ``` USAGE - $ sfdx hardis:project:audit:remotesites [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:audit:remotesites [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2124,7 +2126,7 @@ Remove unwanted empty items within sfdx project sources ``` USAGE - $ sfdx hardis:project:clean:emptyitems [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:clean:emptyitems [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2153,7 +2155,7 @@ Remove unwanted hidden items within sfdx project sources ``` USAGE - $ sfdx hardis:project:clean:hiddenitems [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:clean:hiddenitems [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2182,7 +2184,7 @@ Replace Mine by Everything in ListView, and log the replacements in sfdx-hardis. ``` USAGE - $ sfdx hardis:project:clean:listviews [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:clean:listviews [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2241,7 +2243,7 @@ Remove all profile attributes that exist on Permission Sets ``` USAGE - $ sfdx hardis:project:clean:minimizeprofiles [-f ] [-d] [--websocket ] [--skipauth] [--json] + $ sfdx hardis:project:clean:minimizeprofiles [-f ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2263,18 +2265,18 @@ DESCRIPTION Salesforce will deprecate such capability in Spring 26. - Don't wait for that, and use minimizeProfiles cleaning to automatically remove from Profiles any permission that + Don't wait for that, and use minimizeProfiles cleaning to automatically remove from Profiles any permission that exists on a Permission Set ! The following XML tags are removed automatically: - - classAccesses - - customMetadataTypeAccesses - - externalDataSourceAccesses - - fieldPermissions - - objectPermissions - - pageAccesses - - userPermissions (except on Admin Profile) +- classAccesses +- customMetadataTypeAccesses +- externalDataSourceAccesses +- fieldPermissions +- objectPermissions +- pageAccesses +- userPermissions (except on Admin Profile) You can override this list by defining a property minimizeProfilesNodesToRemove in your .sfdx-hardis.yml config file. @@ -2290,7 +2292,7 @@ Clean SFDX sources from items present neither in target org nor local package.xm ``` USAGE - $ sfdx hardis:project:clean:orgmissingitems [-f ] [-p ] [-t ] [-d] [--websocket ] + $ sfdx hardis:project:clean:orgmissingitems [-f ] [-p ] [-t ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2333,7 +2335,7 @@ Remove unwanted references within sfdx project sources ``` USAGE - $ sfdx hardis:project:clean:references [-t ] [-c ] [-d] [--websocket ] [--skipauth] [--json] + $ sfdx hardis:project:clean:references [-t ] [-c ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2373,7 +2375,7 @@ Retrieve dashboards, documents and report folders in DX sources. Use -u ORGALIAS ``` USAGE - $ sfdx hardis:project:clean:retrievefolders [-d] [--websocket ] [--skipauth] [-u ] [--apiversion + $ sfdx hardis:project:clean:retrievefolders [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2408,7 +2410,7 @@ Remove unwanted standard items within sfdx project sources ``` USAGE - $ sfdx hardis:project:clean:standarditems [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:clean:standarditems [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2436,7 +2438,7 @@ Clean System.debug() lines in APEX Code (classes and triggers) ``` USAGE - $ sfdx hardis:project:clean:systemdebug [-f ] [--websocket ] [--skipauth] [-d] [--json] [--loglevel + $ sfdx hardis:project:clean:systemdebug [-f ] [--websocket ] [--skipauth] [-d] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2465,7 +2467,7 @@ Remove XML elements using Glob patterns and XPath expressions ``` USAGE - $ sfdx hardis:project:clean:xml [-f ] [-p -x ] [-n ] [-d] [--websocket ] + $ sfdx hardis:project:clean:xml [-f ] [-p -x ] [-n ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2497,13 +2499,13 @@ OPTIONS DESCRIPTION This can be very useful to avoid to always remove manually the same elements in the same XML file. - - **globpattern** can be any glob pattern allowing to identify the XML files to update, for example +- **globpattern** can be any glob pattern allowing to identify the XML files to update, for example `/**/*.flexipage-meta.xml` - - **xpath** can be any xpath following the format `//ns:PARENT-TAG-NAME//ns:TAG-NAME[contains(text(),'TAG-VALUE')]`. +- **xpath** can be any xpath following the format `//ns:PARENT-TAG-NAME//ns:TAG-NAME[contains(text(),'TAG-VALUE')]`. If an element is found, the whole **PARENT-TAG-NAME** (with its subtree) will be removed. - ![How to build cleaning + ![How to build cleaning XPath](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/doc-clean-xml.jpg) Note: If globpattern and xpath are not sent, elements defined in property **cleanXmlPatterns** in **.sfdx-hardis.yml** @@ -2511,7 +2513,7 @@ DESCRIPTION EXAMPLES $ sfdx hardis:project:clean:xml - $ sfdx hardis:project:clean:xml --globpattern "/**/*.flexipage-meta.xml" --xpath + $ sfdx hardis:project:clean:xml --globpattern "/**/*.flexipage-meta.xml" --xpath "//ns:flexiPageRegions//ns:name[contains(text(),'dashboardName')]" ``` @@ -2523,7 +2525,7 @@ Configure authentication from git branch to target org ``` USAGE - $ sfdx hardis:project:configure:auth [-b] [-d] [--websocket ] [--skipauth] [-v ] [-u ] + $ sfdx hardis:project:configure:auth [-b] [-d] [--websocket ] [--skipauth] [-v ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2562,7 +2564,7 @@ Creates permission sets from existing profiles, with id PS_PROFILENAME ``` USAGE - $ sfdx hardis:project:convert:profilestopermsets [-e ] [-d] [--websocket ] [--skipauth] [--json] + $ sfdx hardis:project:convert:profilestopermsets [-e ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2591,7 +2593,7 @@ Create a new SFDX Project ``` USAGE - $ sfdx hardis:project:create [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:create [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2619,9 +2621,9 @@ Deploy SFDX source to org, following deploymentPlan in .sfdx-hardis.yml ``` USAGE - $ sfdx hardis:project:deploy:sources:dx [-c] [-l - NoTestRun|RunSpecifiedTests|RunRepositoryTests|RunLocalTests|RunAllTestsInOrg] [-r ] [-p ] [-d] - [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:project:deploy:sources:dx [-c] [-l + NoTestRun|RunSpecifiedTests|RunRepositoryTests|RunLocalTests|RunAllTestsInOrg] [-r ] [-p ] [-d] + [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2660,41 +2662,41 @@ OPTIONS Websocket host:port for VsCode SFDX Hardis UI integration DESCRIPTION - In case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error + In case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages. - ### Quick Deploy +### Quick Deploy - In case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button + In case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy) If you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false` - - [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/) - - [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/) - - [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/) +- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/) +- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/) +- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/) - ### Dynamic deployment items / Overwrite management +### Dynamic deployment items / Overwrite management If necessary,you can define the following files (that supports wildcards *): - - `manifest/packageDeployOnce.xml`: Every element defined in this file will be deployed only if it is not existing yet +- `manifest/packageDeployOnce.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org) - - `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a +- `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example) See [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/) - ### Deployment plan +### Deployment plan If you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`. - - If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan +- If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan - - If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges +- If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges - - If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied +- If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied Example: @@ -2710,13 +2712,13 @@ DESCRIPTION waitAfter: 30 ``` - ### Packages installation +### Packages installation You can define a list of package to install during deployments using property `installedPackages` - - If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in +- If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in `.sfdx-hardis.yml`), packages will be installed even if the command is called with `--check` mode - - You can automatically update this property by listing all packages installed on an org using command `sfdx +- You can automatically update this property by listing all packages installed on an org using command `sfdx hardis:org:retrieve:packageconfig` Example: @@ -2746,11 +2748,11 @@ DESCRIPTION installDuringDeployments: true ``` - ### Automated fixes post deployments +### Automated fixes post deployments - #### List view with scope Mine +#### List view with scope Mine - If you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( + If you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( see command ) Example: @@ -2765,7 +2767,7 @@ DESCRIPTION - "Account:MyActivePartners" ``` - Troubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround + Troubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround in your dockerfile: ```dockerfile @@ -2776,7 +2778,7 @@ DESCRIPTION ENV PUPPETEER_EXECUTABLE_PATH="$\{CHROMIUM_PATH}" // remove \ before { ``` - If you need to increase the deployment waiting time (force:source:deploy --wait arg), you can define env var + If you need to increase the deployment waiting time (force:source:deploy --wait arg), you can define env var SFDX_DEPLOY_WAIT_MINUTES EXAMPLES @@ -2792,8 +2794,8 @@ Deploy metadatas to source org ``` USAGE - $ sfdx hardis:project:deploy:sources:metadata [-c] [-x ] [-p ] [-f] [-k ] [-l - NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-d] [--websocket ] [--skipauth] [-u ] + $ sfdx hardis:project:deploy:sources:metadata [-c] [-x ] [-p ] [-f] [-k ] [-l + NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2844,7 +2846,7 @@ Fix flexipages for apiVersion v53 (Winter22). ``` USAGE - $ sfdx hardis:project:fix:v53flexipages [-p ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:fix:v53flexipages [-p ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2879,8 +2881,8 @@ Generate package.xml git delta between 2 commits ``` USAGE - $ sfdx hardis:project:generate:gitdelta [--branch ] [--fromcommit ] [--tocommit ] [-d] - [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:generate:gitdelta [--branch ] [--fromcommit ] [--tocommit ] [-d] + [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2912,7 +2914,7 @@ Apply syntactic analysis (linters) on the repository sources, using Mega-Linter ``` USAGE - $ sfdx hardis:project:lint [-f] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] + $ sfdx hardis:project:lint [-f] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2949,7 +2951,7 @@ find duplicate values in XML file(s). ``` USAGE - $ sfdx hardis:project:metadata:findduplicates [-f ] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:project:metadata:findduplicates [-f ] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2966,7 +2968,7 @@ OPTIONS Hardis UI integration DESCRIPTION - Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property + Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys. Default config : @@ -3018,7 +3020,7 @@ Create and initialize a scratch org or a source-tracked sandbox (config can be d ``` USAGE - $ sfdx hardis:scratch:create [-n] [-d] [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:create [-n] [-d] [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3048,15 +3050,15 @@ OPTIONS Hardis UI integration DESCRIPTION - - **Install packages** - - Use property `installedPackages` - - **Push sources** - - **Assign permission sets** - - Use property `initPermissionSets` - - **Run apex initialization scripts** - - Use property `scratchOrgInitApexScripts` - - **Load data** - - Use property `dataPackages` +- **Install packages** + - Use property `installedPackages` +- **Push sources** +- **Assign permission sets** + - Use property `initPermissionSets` +- **Run apex initialization scripts** + - Use property `scratchOrgInitApexScripts` +- **Load data** + - Use property `dataPackages` EXAMPLE $ sfdx hardis:scratch:create @@ -3070,7 +3072,7 @@ Assisted menu to delete scratch orgs associated to a DevHub ``` USAGE - $ sfdx hardis:scratch:delete [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] + $ sfdx hardis:scratch:delete [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3105,7 +3107,7 @@ Select a data storage service and configure information to build a scratch org p ``` USAGE - $ sfdx hardis:scratch:pool:create [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:pool:create [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3152,7 +3154,7 @@ Calls the related storage service to request api keys and secrets that allows a ``` USAGE - $ sfdx hardis:scratch:pool:localauth [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:pool:localauth [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3187,7 +3189,7 @@ Create enough scratch orgs to fill the pool ``` USAGE - $ sfdx hardis:scratch:pool:refresh [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:pool:refresh [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3222,7 +3224,7 @@ Reset scratch org pool (delete all scratches in the pool) ``` USAGE - $ sfdx hardis:scratch:pool:reset [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:pool:reset [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3257,7 +3259,7 @@ Displays all stored content of project scratch org pool if defined ``` USAGE - $ sfdx hardis:scratch:pool:view [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] + $ sfdx hardis:scratch:pool:view [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3292,7 +3294,7 @@ This commands pulls the updates you performed in your scratch or sandbox org, in ``` USAGE - $ sfdx hardis:scratch:pull [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] + $ sfdx hardis:scratch:pull [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3316,16 +3318,16 @@ OPTIONS Hardis UI integration DESCRIPTION - Then, you probably want to stage and commit the files containing the updates you want to keep, as explained in this + Then, you probably want to stage and commit the files containing the updates you want to keep, as explained in this video. - - - Calls sfdx force:source:pull under the hood - - If there are errors, proposes to automatically add erroneous item in `.forceignore`, then pull again - - If you want to always retrieve sources like CustomApplication that are not always detected as updates by +- Calls sfdx force:source:pull under the hood +- If there are errors, proposes to automatically add erroneous item in `.forceignore`, then pull again +- If you want to always retrieve sources like CustomApplication that are not always detected as updates by force:source:pull , you can define property **autoRetrieveWhenPull** in .sfdx-hardis.yml Example: @@ -3348,7 +3350,7 @@ Push local files to scratch org ``` USAGE - $ sfdx hardis:scratch:push [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] + $ sfdx hardis:scratch:push [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3386,11 +3388,11 @@ sfdx-hardis wrapper for sfdx force:source:deploy that displays tips to solve dep ``` USAGE - $ sfdx hardis:source:deploy [--soapdeploy] [-w ] [--predestructivechanges ] - [--postdestructivechanges ] [-f [-t | | [-q | -x | -m | -p | -c | -l - NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g]]] [--resultsdir ] - [--coverageformatters ] [--junit] [--checkcoverage] [--debug] [--websocket ] [-u ] - [--apiversion ] [--verbose] [--json] [--loglevel + $ sfdx hardis:source:deploy [--soapdeploy] [-w ] [--predestructivechanges ] + [--postdestructivechanges ] [-f [-t | | [-q | -x | -m | -p | -c | -l + NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g]]] [--resultsdir ] + [--coverageformatters ] [--junit] [--checkcoverage] [--debug] [--websocket ] [-u ] + [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3441,34 +3443,34 @@ OPTIONS --websocket=websocket websocket DESCRIPTION - Additional to the base command wrapper: If using **--checkonly**, add options **--checkcoverage** and - **--coverageformatters json-summary** to check that org coverage is > 75% (or value defined in .sfdx-hardis.yml + Additional to the base command wrapper: If using **--checkonly**, add options **--checkcoverage** and + **--coverageformatters json-summary** to check that org coverage is > 75% (or value defined in .sfdx-hardis.yml property **apexTestsMinCoverageOrgWide**) You can also have deployment results as pull request comments, on: - - GitHub (see [GitHub Pull Requests comments +- GitHub (see [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)) - - Gitlab (see [Gitlab integration +- Gitlab (see [Gitlab integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)) - - Azure DevOps (see [Azure integration +- Azure DevOps (see [Azure integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)) - [![Assisted solving of Salesforce deployments + [![Assisted solving of Salesforce deployments errors](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deployment-errors.jpg)](http s://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0) Notes: - - You can disable coloring of errors in red by defining env variable SFDX_HARDIS_DEPLOY_ERR_COLORS=false +- You can disable coloring of errors in red by defining env variable SFDX_HARDIS_DEPLOY_ERR_COLORS=false [See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sf dx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) EXAMPLE - $ sfdx hardis:source:deploy -x manifest/package.xml --wait 60 --ignorewarnings --testlevel RunLocalTests - --postdestructivechanges ./manifest/destructiveChanges.xml --targetusername nicolas.vuillamy@cloudity.com.sfdxhardis + $ sfdx hardis:source:deploy -x manifest/package.xml --wait 60 --ignorewarnings --testlevel RunLocalTests + --postdestructivechanges ./manifest/destructiveChanges.xml --targetusername nicolas.vuillamy@cloudity.com.sfdxhardis --checkonly --checkcoverage --verbose --coverageformatters json-summary ``` @@ -3480,7 +3482,7 @@ sfdx-hardis wrapper for sfdx force:source:push that displays tips to solve deplo ``` USAGE - $ sfdx hardis:source:push [-f] [-w ] [-g] [--debug] [--websocket ] [-u ] [--apiversion + $ sfdx hardis:source:push [-f] [-w ] [-g] [--debug] [--websocket ] [-u ] [--apiversion ] [--quiet] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3507,7 +3509,7 @@ OPTIONS --websocket=websocket websocket DESCRIPTION - [![Assisted solving of Salesforce deployments + [![Assisted solving of Salesforce deployments errors](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deployment-errors.jpg)](http s://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0) @@ -3523,8 +3525,8 @@ sfdx-hardis wrapper for sfdx force:source:retrieve ``` USAGE - $ sfdx hardis:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-f -t] [-d] - [--websocket ] [--skipauth] [-u ] [-a ] [--verbose] [--json] [--loglevel + $ sfdx hardis:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-f -t] [-d] + [--websocket ] [--skipauth] [-u ] [-a ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3563,8 +3565,8 @@ OPTIONS --websocket=websocket websocket DESCRIPTION - - If no retrieve constraint is sent, as assisted menu will request the list of metadatas to retrieve - - If no org is selected , an assisted menu will request the user to choose one +- If no retrieve constraint is sent, as assisted menu will request the list of metadatas to retrieve +- If no org is selected , an assisted menu will request the user to choose one [See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sf dx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_retrieve) @@ -3578,7 +3580,7 @@ Assisted menu to start working on a Salesforce task. ``` USAGE - $ sfdx hardis:work:new [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] + $ sfdx hardis:work:new [-d] [--websocket ] [--skipauth] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3602,28 +3604,28 @@ OPTIONS Hardis UI integration DESCRIPTION - Advanced instructions in [Create New Task + Advanced instructions in [Create New Task documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-create-new-task/) At the end of the command, it will allow you to work on either a scratch org or a sandbox, depending on your choices. Under the hood, it can: - - Make **git pull** to be up to date with target branch - - Create **new git branch** with formatted name (you can override the choices using .sfdx-hardis.yml property +- Make **git pull** to be up to date with target branch +- Create **new git branch** with formatted name (you can override the choices using .sfdx-hardis.yml property **branchPrefixChoices**) - - Create and initialize a scratch org or a source-tracked sandbox (config can be defined using +- Create and initialize a scratch org or a source-tracked sandbox (config can be defined using `config/.sfdx-hardis.yml`): - - (and for scratch org only for now): - - **Install packages** - - Use property `installedPackages` - - **Push sources** - - **Assign permission sets** - - Use property `initPermissionSets` - - **Run apex initialization scripts** - - Use property `scratchOrgInitApexScripts` - - **Load data** - - Use property `dataPackages` +- (and for scratch org only for now): + - **Install packages** + - Use property `installedPackages` + - **Push sources** + - **Assign permission sets** + - Use property `initPermissionSets` + - **Run apex initialization scripts** + - Use property `scratchOrgInitApexScripts` + - **Load data** + - Use property `dataPackages` EXAMPLE $ sfdx hardis:work:task:new @@ -3637,7 +3639,7 @@ Make my local branch and my scratch org up to date with the most recent sources ``` USAGE - $ sfdx hardis:work:refresh [-n] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] + $ sfdx hardis:work:refresh [-n] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3675,7 +3677,7 @@ Resets the selection that we want to add in the merge request ``` USAGE - $ sfdx hardis:work:resetselection [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] + $ sfdx hardis:work:resetselection [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3714,7 +3716,7 @@ When a work task is completed, guide user to create a merge request ``` USAGE $ sfdx hardis:work:save [-n] [-g] [-c] [--auto] [--targetbranch ] [-d] [--websocket ] [--skipauth] [-u - ] [--apiversion ] [--json] [--loglevel + ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -3750,12 +3752,12 @@ OPTIONS DESCRIPTION Advanced instructions in [Publish a task](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-publish-task/) - - Generate package-xml diff using sfdx-git-delta - - Automatically update `manifest/package.xml` and `manifest/destructiveChanges.xml` according to the committed updates - - Automatically Clean XML files using `.sfdx-hardis.yml` properties - - `autocleantypes`: List of auto-performed sources cleanings, available on command +- Generate package-xml diff using sfdx-git-delta +- Automatically update `manifest/package.xml` and `manifest/destructiveChanges.xml` according to the committed updates +- Automatically Clean XML files using `.sfdx-hardis.yml` properties + - `autocleantypes`: List of auto-performed sources cleanings, available on command [hardis:project:clean:references](https://sfdx-hardis.cloudity.com/hardis/project/clean/references/) - - `autoRemoveUserPermissions`: List of userPermission to automatically remove from profile metadatas + - `autoRemoveUserPermissions`: List of userPermission to automatically remove from profile metadatas Example: @@ -3777,7 +3779,7 @@ DESCRIPTION - WorkCalibrationUser ``` - - Push commit to server +- Push commit to server EXAMPLES $ sfdx hardis:work:task:save @@ -3792,7 +3794,7 @@ Technical calls to WebSocket functions ``` USAGE - $ sfdx hardis:work:ws [-e ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel + $ sfdx hardis:work:ws [-e ] [-d] [--websocket ] [--skipauth] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS diff --git a/docs/commands.md b/docs/commands.md index 695d7963d..ceec79b00 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -58,6 +58,7 @@ | [**hardis:org:diagnose:legacyapi**](hardis/org/diagnose/legacyapi.md) | Check for legacy API use | | [**hardis:org:files:export**](hardis/org/files/export.md) | Export files | | [**hardis:org:fix:listviewmine**](hardis/org/fix/listviewmine.md) | Fix listviews with | +| [**hardis:org:generate:packagexmlfull**](hardis/org/generate/packagexmlfull.md) | Generate Full Org package.xml | | [**hardis:org:purge:apexlog**](hardis/org/purge/apexlog.md) | Purge Apex Logs | | [**hardis:org:purge:flow**](hardis/org/purge/flow.md) | Purge Flow versions | | [**hardis:org:retrieve:packageconfig**](hardis/org/retrieve/packageconfig.md) | Retrieve package configuration from an org | diff --git a/docs/deployTips.md b/docs/deployTips.md index 5b8a17d91..0affeb63b 100644 --- a/docs/deployTips.md +++ b/docs/deployTips.md @@ -8,11 +8,11 @@ description: Learn how to fix issues that can happen during sfdx deployments This page summarizes all errors that can be detected by sfdx-hardis wrapper commands -| sfdx command | sfdx-hardis wrapper command | -| :----------- | :-------------------------- | -| [sfdx force:source:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) | [sfdx hardis:source:deploy](https://sfdx-hardis.cloudity.com/hardis/source/deploy/) | -| [sfdx force:source:push](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_push) | [sfdx hardis:source:push](https://sfdx-hardis.cloudity.com/hardis/source/push/) | -| [sfdx force:mdapi:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm#cli_reference_force_mdapi_beta_deploy) | [sfdx hardis:mdapi:deploy](https://sfdx-hardis.cloudity.com/hardis/mdapi/deploy/) | +| sfdx command | sfdx-hardis wrapper command | +|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| +| [sfdx force:source:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) | [sfdx hardis:source:deploy](https://sfdx-hardis.cloudity.com/hardis/source/deploy/) | +| [sfdx force:source:push](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_push) | [sfdx hardis:source:push](https://sfdx-hardis.cloudity.com/hardis/source/push/) | +| [sfdx force:mdapi:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm#cli_reference_force_mdapi_beta_deploy) | [sfdx hardis:mdapi:deploy](https://sfdx-hardis.cloudity.com/hardis/mdapi/deploy/) | You can also use this function on a [sfdx-hardis Salesforce CI/CD project](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-home/) @@ -302,7 +302,7 @@ You probably also need to add CRM Analytics Admin Permission Set assignment to t ## Error parsing file -- `Error (.*) Error parsing file: (.*) ` +- `Error (.*) Error parsing file: (.*)` **Resolution tip** @@ -902,7 +902,7 @@ Please check https://developer.salesforce.com/forums/?id=9060G0000005kVLQAY ## Test classes with 0% coverage -- ` 0%` +- `0%` **Resolution tip** diff --git a/docs/hardis/org/generate/packagexmlfull.md b/docs/hardis/org/generate/packagexmlfull.md new file mode 100644 index 000000000..5303e1277 --- /dev/null +++ b/docs/hardis/org/generate/packagexmlfull.md @@ -0,0 +1,35 @@ + +# hardis:org:generate:packagexmlfull + +## Description + +Generates full org package.xml, including managed items + +## Parameters + +| Name | Type | Description | Default | Required | Options | +|:----------------------|:-------:|:--------------------------------------------------------------------|:-------:|:--------:|:-----------------------------------------------------:| +| apiversion | option | override the api version used for api requests made by this command | | | | +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| outputfile | option | Output package.xml file | | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| targetusername
-u | option | username or alias for the target org; overrides default target org | | | | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | + +## Examples + +```shell +sfdx hardis:org:generate:packagexmlfull +``` + +```shell +sfdx hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml +``` + +```shell +sfdx hardis:org:generate:packagexmlfull --targetusername nico@example.com +``` + + diff --git a/docs/hardis/org/purge/flow.md b/docs/hardis/org/purge/flow.md index 004dcc471..debf72e9a 100644 --- a/docs/hardis/org/purge/flow.md +++ b/docs/hardis/org/purge/flow.md @@ -7,20 +7,20 @@ Purge Obsolete flow versions to avoid the 50 max versions limit. Filters on Stat ## Parameters -| Name | Type | Description | Default | Required | Options | | -|:-------------------------|:-------:|:------------------------------------------------------------------------------------|:-------------------------------:|:--------:|:-----------------------------------------------------:|---| -| allowpurgefailure
-f | boolean | Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable | | | | | -| apiversion | option | override the api version used for api requests made by this command | | | | | -| debug
-d | boolean | Activate debug mode (more logs) | | | | | -| instanceurl
-r | option | URL of org instance | < | | | > | -| json | boolean | format output as json | | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | | -| name
-n | option | Filter according to Name criteria | | | | | -| prompt
-z | boolean | Prompt for confirmation (true by default, use --no-prompt to skip) | | | | | -| skipauth | boolean | Skip authentication check when a default username is required | | | | | -| status
-s | option | Filter according to Status criteria | | | | | -| targetusername
-u | option | username or alias for the target org; overrides default target org | | | | | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | | +| Name | Type | Description | Default | Required | Options | +|:-------------------------|:-------:|:------------------------------------------------------------------------------------|:------------------------------:|:--------:|:-----------------------------------------------------:| +| allowpurgefailure
-f | boolean | Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable | | | | +| apiversion | option | override the api version used for api requests made by this command | | | | +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| instanceurl
-r | option | URL of org instance | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| name
-n | option | Filter according to Name criteria | | | | +| prompt
-z | boolean | Prompt for confirmation (true by default, use --no-prompt to skip) | | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| status
-s | option | Filter according to Status criteria | | | | +| targetusername
-u | option | username or alias for the target org; overrides default target org | | | | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | ## Examples diff --git a/docs/hardis/org/retrieve/sources/metadata.md b/docs/hardis/org/retrieve/sources/metadata.md index f7211a51a..97d1621f0 100644 --- a/docs/hardis/org/retrieve/sources/metadata.md +++ b/docs/hardis/org/retrieve/sources/metadata.md @@ -27,4 +27,8 @@ Retrieve Salesforce DX project from org sfdx hardis:org:retrieve:sources:metadata ``` +```shell +SFDX_RETRIEVE_WAIT_MINUTES=200 sfdx hardis:org:retrieve:sources:metadata +``` + diff --git a/docs/hardis/org/test/apex.md b/docs/hardis/org/test/apex.md index 1bab5a3c3..e2df5da00 100644 --- a/docs/hardis/org/test/apex.md +++ b/docs/hardis/org/test/apex.md @@ -10,6 +10,8 @@ If following configuration is defined, it will fail if apex coverage target is n - Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` - Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide` +You can override env var SFDX_TEST_WAIT_MINUTES to wait more than 60 minutes + ## Parameters diff --git a/docs/hardis/project/audit/duplicatefiles.md b/docs/hardis/project/audit/duplicatefiles.md index a356f4e6b..fc8006868 100644 --- a/docs/hardis/project/audit/duplicatefiles.md +++ b/docs/hardis/project/audit/duplicatefiles.md @@ -3,18 +3,18 @@ ## Description -Find duplicate files in sfdx folder (often from past sfdx-cli bugs) +Find duplicate files in sfdx folder (often from past @salesforce/cli bugs) ## Parameters -| Name | Type | Description | Default | Required | Options | -|:-------------|:-------:|:--------------------------------------------------------------|:----------------------:|:--------:|:-----------------------------------------------------:| -| debug
-d | boolean | Activate debug mode (more logs) | | | | -| json | boolean | format output as json | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | -| path
-p | option | Root path to check | D:\git\sfdx-hardis1703 | | | -| skipauth | boolean | Skip authentication check when a default username is required | | | | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | +| Name | Type | Description | Default | Required | Options | +|:-------------|:-------:|:--------------------------------------------------------------|:------------------:|:--------:|:-----------------------------------------------------:| +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| path
-p | option | Root path to check | C:\git\sfdx-hardis | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | ## Examples diff --git a/docs/hardis/project/clean/references.md b/docs/hardis/project/clean/references.md index e7e6613a4..90036650e 100644 --- a/docs/hardis/project/clean/references.md +++ b/docs/hardis/project/clean/references.md @@ -7,15 +7,15 @@ Remove unwanted references within sfdx project sources ## Parameters -| Name | Type | Description | Default | Required | Options | -|:--------------|:-------:|:--------------------------------------------------------------|:-------:|:--------:|:---------------------------------------------------------------------------------------------------------------:| -| config
-c | option | Path to a JSON config file or a destructiveChanges.xml file | | | | -| debug
-d | boolean | Activate debug mode (more logs) | | | | -| json | boolean | format output as json | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | -| skipauth | boolean | Skip authentication check when a default username is required | | | | -| type
-t | option | Cleaning type | | | all
caseentitlement
dashboards
datadotcom
destructivechanges
localfields
productrequest | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | +| Name | Type | Description | Default | Required | Options | +|:--------------|:-------:|:--------------------------------------------------------------|:-------:|:--------:|:-------------------------------------------------------------------------------------------------------------------------------:| +| config
-c | option | Path to a JSON config file or a destructiveChanges.xml file | | | | +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| type
-t | option | Cleaning type | | | all
caseentitlement
dashboards
datadotcom
destructivechanges
localfields
productrequest
entitlement | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | ## Examples diff --git a/docs/hardis/project/clean/xml.md b/docs/hardis/project/clean/xml.md index 27c34ff80..cc79dc73a 100644 --- a/docs/hardis/project/clean/xml.md +++ b/docs/hardis/project/clean/xml.md @@ -19,17 +19,17 @@ Note: If globpattern and xpath are not sent, elements defined in property **clea ## Parameters -| Name | Type | Description | Default | Required | Options | | -|:-------------------|:-------:|:--------------------------------------------------------------------------------------------------------------------|:------------------------------------------:|:--------:|:-----------------------------------------------------:|---| -| debug
-d | boolean | Activate debug mode (more logs) | | | | | -| folder
-f | option | Root folder | force-app | | | | -| globpattern
-p | option | Glob pattern to find files to clean. Ex: /**/*.flexipage-meta.xml | | | | | -| json | boolean | format output as json | | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | | -| namespace
-n | option | XML Namespace to use | < | | | > | -| skipauth | boolean | Skip authentication check when a default username is required | | | | | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | | -| xpath
-x | option | XPath to use to detect the elements to remove. Ex: //ns:flexiPageRegions//ns:name[contains(text(),'dashboardName')] | | | | | +| Name | Type | Description | Default | Required | Options | +|:-------------------|:-------:|:--------------------------------------------------------------------------------------------------------------------|:-----------------------------------------:|:--------:|:-----------------------------------------------------:| +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| folder
-f | option | Root folder | force-app | | | +| globpattern
-p | option | Glob pattern to find files to clean. Ex: /**/*.flexipage-meta.xml | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| namespace
-n | option | XML Namespace to use | | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | +| xpath
-x | option | XPath to use to detect the elements to remove. Ex: //ns:flexiPageRegions//ns:name[contains(text(),'dashboardName')] | | | | ## Examples diff --git a/docs/hardis/project/deploy/sources/dx.md b/docs/hardis/project/deploy/sources/dx.md index beaaae1b3..bfab39647 100644 --- a/docs/hardis/project/deploy/sources/dx.md +++ b/docs/hardis/project/deploy/sources/dx.md @@ -7,13 +7,25 @@ Deploy SFDX source to org, following deploymentPlan in .sfdx-hardis.yml In case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages. -### Dynamic deployment items +### Quick Deploy + +In case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy) + +If you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false` + +- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/) +- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/) +- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/) + +### Dynamic deployment items / Overwrite management If necessary,you can define the following files (that supports wildcards *): - `manifest/packageDeployOnce.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org) - `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example) +See [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/) + ### Deployment plan If you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`. @@ -97,23 +109,25 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" ENV CHROMIUM_PATH="/usr/bin/chromium-browser" ENV PUPPETEER_EXECUTABLE_PATH="$\{CHROMIUM_PATH}" // remove \ before { ``` + +If you need to increase the deployment waiting time (force:source:deploy --wait arg), you can define env var SFDX_DEPLOY_WAIT_MINUTES ## Parameters -| Name | Type | Description | Default | Required | Options | -|:----------------------|:-------:|:---------------------------------------------------------------------|:-------------:|:--------:|:---------------------------------------------------------------------------------------------:| -| apiversion | option | override the api version used for api requests made by this command | | | | -| check
-c | boolean | Only checks the deployment, there is no impact on target org | | | | -| debug
-d | boolean | Activate debug mode (more logs) | | | | -| json | boolean | format output as json | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | -| packagexml
-p | option | Path to package.xml containing what you want to deploy in target org | | | | -| skipauth | boolean | Skip authentication check when a default username is required | | | | -| targetusername
-u | option | username or alias for the target org; overrides default target org | | | | -| testlevel
-l | option | Level of tests to apply to validate deployment | RunLocalTests | | NoTestRun
RunSpecifiedTests
RunRepositoryTests
RunLocalTests
RunAllTestsInOrg | -| runtests
-r | option | Apex test classes to run if --testlevel is RunSpecifiedTests | | | | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | +| Name | Type | Description | Default | Required | Options | +|:----------------------|:-------:|:----------------------------------------------------------------------------------------------------------|:-------------:|:--------:|:---------------------------------------------------------------------------------------------:| +| apiversion | option | override the api version used for api requests made by this command | | | | +| check
-c | boolean | Only checks the deployment, there is no impact on target org | | | | +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| packagexml
-p | option | Path to package.xml containing what you want to deploy in target org | | | | +| runtests
-r | option | Apex test classes to run if --testlevel is RunSpecifiedTests | | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| targetusername
-u | option | username or alias for the target org; overrides default target org | | | | +| testlevel
-l | option | Level of tests to validate deployment. RunRepositoryTests auto-detect and run all repository test classes | RunLocalTests | | NoTestRun
RunSpecifiedTests
RunRepositoryTests
RunLocalTests
RunAllTestsInOrg | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | ## Examples @@ -125,9 +139,4 @@ sfdx hardis:project:deploy:sources:dx sfdx hardis:project:deploy:sources:dx --check ``` -Validate deployment by running all APEX test classes found within your GIT repository -```shell -sfdx hardis:project:deploy:sources:dx --check --testlevel RunRepositoryTests -``` - diff --git a/docs/hardis/project/fix/v53flexipages.md b/docs/hardis/project/fix/v53flexipages.md index 9b4609927..e411c51e4 100644 --- a/docs/hardis/project/fix/v53flexipages.md +++ b/docs/hardis/project/fix/v53flexipages.md @@ -9,14 +9,14 @@ Note: Update api version to 53.0 in package.xml and sfdx-project.json ## Parameters -| Name | Type | Description | Default | Required | Options | -|:-------------|:-------:|:--------------------------------------------------------------|:----------------------:|:--------:|:-----------------------------------------------------:| -| debug
-d | boolean | Activate debug mode (more logs) | | | | -| json | boolean | format output as json | | | | -| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | -| path
-p | option | Root folder | D:\git\sfdx-hardis1703 | | | -| skipauth | boolean | Skip authentication check when a default username is required | | | | -| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | +| Name | Type | Description | Default | Required | Options | +|:-------------|:-------:|:--------------------------------------------------------------|:------------------:|:--------:|:-----------------------------------------------------:| +| debug
-d | boolean | Activate debug mode (more logs) | | | | +| json | boolean | format output as json | | | | +| loglevel | option | logging level for this command invocation | warn | | trace
debug
info
warn
error
fatal | +| path
-p | option | Root folder | C:\git\sfdx-hardis | | | +| skipauth | boolean | Skip authentication check when a default username is required | | | | +| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | | | | ## Examples diff --git a/docs/hardis/project/metadata/findduplicates.md b/docs/hardis/project/metadata/findduplicates.md index db4ffda36..801322cb3 100644 --- a/docs/hardis/project/metadata/findduplicates.md +++ b/docs/hardis/project/metadata/findduplicates.md @@ -8,10 +8,7 @@ find duplicate values in XML file(s). Default config : metadataDuplicateFindKeys : -{ - layout: ["Layout.layoutSections.layoutColumns.layoutItems.field", "Layout.quickActionListItems.quickActionName"], - profile: ["Profile.fieldPermissions.field"], -}; +[object Object] ## Parameters diff --git a/docs/hardis/source/deploy.md b/docs/hardis/source/deploy.md index 5dd935d4c..dc8ce11eb 100644 --- a/docs/hardis/source/deploy.md +++ b/docs/hardis/source/deploy.md @@ -9,10 +9,17 @@ Additional to the base command wrapper: If using **--checkonly**, add options ** You can also have deployment results as pull request comments, on: -- **Gitlab** (see [Gitlab integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)) +- GitHub (see [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)) +- Gitlab (see [Gitlab integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)) +- Azure DevOps (see [Azure integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)) + [![Assisted solving of Salesforce deployments errors](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deployment-errors.jpg)](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0) +Notes: + +- You can disable coloring of errors in red by defining env variable SFDX_HARDIS_DEPLOY_ERR_COLORS=false + [See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) diff --git a/docs/hardis/work/new.md b/docs/hardis/work/new.md index 88a1840e8..a7e30e894 100644 --- a/docs/hardis/work/new.md +++ b/docs/hardis/work/new.md @@ -5,6 +5,8 @@ Assisted menu to start working on a Salesforce task. +Advanced instructions in [Create New Task documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-create-new-task/) + At the end of the command, it will allow you to work on either a scratch org or a sandbox, depending on your choices. Under the hood, it can: diff --git a/docs/hardis/work/save.md b/docs/hardis/work/save.md index c727bd7a0..8a8905d26 100644 --- a/docs/hardis/work/save.md +++ b/docs/hardis/work/save.md @@ -5,6 +5,8 @@ When a work task is completed, guide user to create a merge request +Advanced instructions in [Publish a task](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-publish-task/) + - Generate package-xml diff using sfdx-git-delta - Automatically update `manifest/package.xml` and `manifest/destructiveChanges.xml` according to the committed updates - Automatically Clean XML files using `.sfdx-hardis.yml` properties diff --git a/docs/index.md b/docs/index.md index 2c6c0e73d..8db6f8dba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,10 @@ + [![sfdx-hardis by Cloudity Banner](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/sfdx-hardis-banner.png)](https://sfdx-hardis.cloudity.com) # sfdx-hardis -[_Presented at Dreamforce !_](https://reg.salesforce.com/flow/plus/df23/sessioncatalog/page/catalog/session/1684196389783001OqEl){target=_blank} +[_Presented at Dreamforce !_](https://reg.salesforce.com/flow/plus/df23/sessioncatalog/page/catalog/session/1684196389783001OqEl) [![Version](https://img.shields.io/npm/v/sfdx-hardis.svg)](https://npmjs.org/package/sfdx-hardis) [![Downloads/week](https://img.shields.io/npm/dw/sfdx-hardis.svg)](https://npmjs.org/package/sfdx-hardis) @@ -23,15 +24,15 @@ It will allow you to: - Do with simple commands what could be done manually in minutes/hours - [Define a complete CI/CD Pipeline for your Salesforce project](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-home/) -[**Please see the full list of commands in Online documentation**](https://sfdx-hardis.cloudity.com){target=_blank} +[**Please see the full list of commands in Online documentation**](https://sfdx-hardis.cloudity.com) -**sfdx-hardis** commands are also available with UI in [**SFDX Hardis Visual Studio Code Extension**](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis){target=_blank} +**sfdx-hardis** commands are also available with UI in [**SFDX Hardis Visual Studio Code Extension**](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis) -[![VsCode SFDX Hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/extension-demo.gif)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis){target=_blank} +[![VsCode SFDX Hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/extension-demo.gif)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis) -_See presentation of sfdx-hardis at Dreamforce !_ +_See Dreamforce presentation_ -
+[![See Dreamforce presentation](https://img.youtube.com/vi/o0Mm9F07UFs/0.jpg)](https://www.youtube.com/watch?v=o0Mm9F07UFs) ## Installation @@ -40,7 +41,7 @@ _See presentation of sfdx-hardis at Dreamforce !_ #### Pre-requisites - Install Node.js ([recommended version](https://nodejs.org/en/)) -- Install Salesforce DX by running `npm install sfdx-cli --global` command line +- Install Salesforce DX by running `npm install @salesforce/cli --global` command line #### Plugin installation @@ -51,26 +52,34 @@ sfdx plugins:install sfdx-hardis For advanced use, please also install dependencies ```sh-session +sf plugins install @salesforce/plugin-packaging sfdx plugins:install sfdmu sfdx plugins:install sfdx-git-delta sfdx plugins:install sfdx-essentials sfdx plugins:install texei-sfdx-plugin ``` +If you are using CI/CD scripts, use `echo y | sfdx plugins:install ...` to bypass prompt. + ### With IDE You can install [Visual Studio Code](https://code.visualstudio.com/) extension [VsCode SFDX Hardis](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis) Once installed, click on ![Hardis Group button](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/hardis-button.jpg) in VsCode left bar, and follow the additional installation instructions -[![VsCode SFDX Hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/extension-icon.png)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis) +[![Installation tutorial](https://img.youtube.com/vi/LA8m-t7CjHA/0.jpg)](https://www.youtube.com/watch?v=LA8m-t7CjHA) ### Docker You can use sfdx-hardis docker images to run in CI -- [**hardisgroupcom/sfdx-hardis:latest**](https://hub.docker.com/r/hardisgroupcom/sfdx-hardis) (with latest sfdx-cli version) -- [**hardisgroupcom/sfdx-hardis:latest-sfdx-recommended**](https://hub.docker.com/r/hardisgroupcom/sfdx-hardis) (with recommended sfdx-cli version, in case the latest version of sfdx-cli is buggy) +- Docker Hub + - [**hardisgroupcom/sfdx-hardis:latest**](https://hub.docker.com/r/hardisgroupcom/sfdx-hardis) (with latest @salesforce/cli version) + - [**hardisgroupcom/sfdx-hardis:latest-sfdx-recommended**](https://hub.docker.com/r/hardisgroupcom/sfdx-hardis) (with recommended @salesforce/cli version, in case the latest version of @salesforce/cli is buggy) + +- GitHub Packages (ghcr.io) + - [**ghcr.io/hardisgroupcom/sfdx-hardis:latest**](https://github.com/orgs/hardisgroupcom/packages) (with latest @salesforce/cli version) + - [**ghcr.io/hardisgroupcom/sfdx-hardis:latest-sfdx-recommended**](https://github.com/orgs/hardisgroupcom/packages) (with recommended @salesforce/cli version, in case the latest version of @salesforce/cli is buggy) _See [Dockerfile](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/Dockerfile)_ @@ -82,10 +91,11 @@ sfdx hardis: ## Articles -Here are some articles with examples of use of [sfdx-hardis](https://sfdx-hardis.cloudity.com/) +Here are some articles about [sfdx-hardis](https://sfdx-hardis.cloudity.com/) - English +[![Salesforce Developers Podcast](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-sfdev.jpg)](https://developer.salesforce.com/podcast/2023/06/sfdx) [![sfdx-hardis: A release management tool for open-source](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-cicd-salesforcedevopsnet.jpg)](https://salesforcedevops.net/index.php/2023/03/01/sfdx-hardis-open-source-salesforce-release-management/) [![Assisted solving of Salesforce deployments errors](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deployment-errors.jpg)](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0) [![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238) @@ -107,7 +117,7 @@ Anyone is welcome to contribute to this sfdx-hardis - Install Node.js ([recommended version](https://nodejs.org/en/)) - Install typescript by running `npm install typescript --global` - Install yarn by running `npm install yarn --global` -- Install Salesforce DX by running `npm install sfdx-cli --global` command line +- Install Salesforce DX by running `npm install @salesforce/cli --global` command line - Fork this repo and clone it (or just clone if you are an internal contributor) - At the root of the repository: - Run `yarn` to install dependencies @@ -192,6 +202,7 @@ Anyone is welcome to contribute to this sfdx-hardis | [**hardis:org:diagnose:legacyapi**](hardis/org/diagnose/legacyapi.md) | Check for legacy API use | | [**hardis:org:files:export**](hardis/org/files/export.md) | Export files | | [**hardis:org:fix:listviewmine**](hardis/org/fix/listviewmine.md) | Fix listviews with | +| [**hardis:org:generate:packagexmlfull**](hardis/org/generate/packagexmlfull.md) | Generate Full Org package.xml | | [**hardis:org:purge:apexlog**](hardis/org/purge/apexlog.md) | Purge Apex Logs | | [**hardis:org:purge:flow**](hardis/org/purge/flow.md) | Purge Flow versions | | [**hardis:org:retrieve:packageconfig**](hardis/org/retrieve/packageconfig.md) | Retrieve package configuration from an org | diff --git a/mkdocs.yml b/mkdocs.yml index 73e62cf51..6b7dbfac1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -88,6 +88,8 @@ nav: export: hardis/org/files/export.md fix: listviewmine: hardis/org/fix/listviewmine.md + generate: + packagexmlfull: hardis/org/generate/packagexmlfull.md purge: apexlog: hardis/org/purge/apexlog.md flow: hardis/org/purge/flow.md