From 66522c08c4b5c8126f5632b8e50d384101ac256d Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Tue, 5 Sep 2023 10:34:14 +0200 Subject: [PATCH] Downgrade @salesforce/plugin-deploy-retrieve to v1.17.6 as workaround for SF cli bug (#412) * Downgrade @salesforce/plugin-deploy-retrieve to v1.17.6 as workaround for SF cli bug Related bug: https://github.com/forcedotcom/cli/issues/2445 * Dockerfile fix * [Mega-Linter] Apply linters fixes --------- Co-authored-by: nvuillam --- CHANGELOG.md | 4 + Dockerfile | 4 +- README.md | 342 ++++++++++----------- defaults/ci/azure-pipelines-checks.yml | 6 +- defaults/ci/azure-pipelines-deployment.yml | 6 +- defaults/monitoring/azure-pipelines.yml | 2 + docs/deployTips.md | 14 +- 7 files changed, 192 insertions(+), 186 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b89b825a..cdde85e4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta` +## [4.2.4] 2023-09-05 + +- Downgrade @salesforce/plugin-deploy-retrieve to v1.17.6 as workaround for SF cli bug + ## [4.2.3] 2023-09-04 - Fix issues with Org monitoring when there are issues with Legacy API diff --git a/Dockerfile b/Dockerfile index 10e875abd..d3bd9bc6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,13 +26,13 @@ ARG SFDX_HARDIS_VERSION=latest RUN npm install --no-cache yarn -g && \ npm install --no-cache @salesforce/cli@${SFDX_CLI_VERSION} -g && \ sf plugins install @salesforce/plugin-packaging && \ + sf plugins install @salesforce/plugin-deploy-retrieve@1.17.6 \ echo 'y' | sfdx plugins:install sfdx-hardis@${SFDX_HARDIS_VERSION} && \ echo 'y' | sfdx plugins:install sfdmu && \ echo 'y' | sfdx plugins:install sfdx-git-delta && \ echo 'y' | sfdx plugins:install sfdx-essentials && \ echo 'y' | sfdx plugins:install texei-sfdx-plugin && \ - sfdx --version && \ - sfdx plugins && \ + sf version --verbose --json \ rm -rf /root/.npm/_cacache # Workaround for https://github.com/forcedotcom/salesforcedx-apex/issues/213 diff --git a/README.md b/README.md index db30a59fe..98dbfd46f 100644 --- a/README.md +++ b/README.md @@ -982,7 +982,7 @@ DESCRIPTION - listViewsMine ``` - - Example of sfdx-hardis.yml property `listViewsToSetToMine`: +- Example of sfdx-hardis.yml property `listViewsToSetToMine`: ```yaml listViewsToSetToMine: @@ -994,7 +994,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: @@ -1006,7 +1006,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 @@ -1030,8 +1030,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 @@ -1070,7 +1070,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 @@ -1109,8 +1109,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 @@ -1159,7 +1159,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 @@ -1179,7 +1179,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 @@ -1215,7 +1215,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 @@ -1250,8 +1250,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 @@ -1301,8 +1301,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 @@ -1342,8 +1342,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 @@ -1384,9 +1384,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 @@ -1435,8 +1435,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** @@ -1489,7 +1489,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 ``` @@ -1501,7 +1501,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 @@ -1534,8 +1534,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 @@ -1565,8 +1565,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 @@ -1582,7 +1582,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 @@ -1615,14 +1615,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 ``` @@ -1634,8 +1634,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 @@ -1674,7 +1674,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) @@ -1693,8 +1693,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 @@ -1733,7 +1733,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) @@ -1752,7 +1752,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 @@ -1787,7 +1787,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 @@ -1831,7 +1831,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 @@ -1843,7 +1843,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 @@ -1860,7 +1860,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 ``` @@ -1872,8 +1872,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 @@ -1920,7 +1920,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 @@ -1955,7 +1955,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 @@ -1994,7 +1994,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 @@ -2029,7 +2029,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 @@ -2089,7 +2089,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 @@ -2117,7 +2117,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 @@ -2146,7 +2146,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 @@ -2175,7 +2175,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 @@ -2234,7 +2234,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 @@ -2256,18 +2256,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. @@ -2283,7 +2283,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 @@ -2326,7 +2326,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 @@ -2366,7 +2366,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 @@ -2401,7 +2401,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 @@ -2429,7 +2429,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 @@ -2458,7 +2458,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 @@ -2490,13 +2490,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** @@ -2504,7 +2504,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')]" ``` @@ -2516,7 +2516,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 @@ -2555,7 +2555,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 @@ -2584,7 +2584,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 @@ -2612,8 +2612,8 @@ Deploy SFDX source to org, following deploymentPlan in .sfdx-hardis.yml ``` USAGE - $ sfdx hardis:project:deploy:sources:dx [-c] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-p - ] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx hardis:project:deploy:sources:dx [-c] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-p + ] [-d] [--websocket ] [--skipauth] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -2647,40 +2647,40 @@ OPTIONS 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` - - [Gitlab merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/) - - [Azure PR comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/) +- [Gitlab merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/) +- [Azure PR 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: @@ -2696,13 +2696,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: @@ -2732,11 +2732,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: @@ -2751,7 +2751,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 @@ -2762,7 +2762,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 @@ -2778,8 +2778,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 @@ -2830,7 +2830,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 @@ -2865,8 +2865,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 @@ -2898,7 +2898,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 @@ -2935,7 +2935,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 @@ -2952,7 +2952,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 : @@ -3004,7 +3004,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 @@ -3034,15 +3034,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 @@ -3056,7 +3056,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 @@ -3091,7 +3091,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 @@ -3138,7 +3138,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 @@ -3173,7 +3173,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 @@ -3208,7 +3208,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 @@ -3243,7 +3243,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 @@ -3278,7 +3278,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 @@ -3302,16 +3302,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: @@ -3334,7 +3334,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 @@ -3372,11 +3372,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 @@ -3427,32 +3427,32 @@ 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: - - 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 ``` @@ -3464,7 +3464,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 @@ -3491,7 +3491,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) @@ -3507,8 +3507,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 @@ -3547,8 +3547,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) @@ -3562,7 +3562,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 @@ -3590,21 +3590,21 @@ DESCRIPTION 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 @@ -3618,7 +3618,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 @@ -3656,7 +3656,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 @@ -3695,7 +3695,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 @@ -3729,12 +3729,12 @@ OPTIONS Hardis UI integration DESCRIPTION - - 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: @@ -3756,7 +3756,7 @@ DESCRIPTION - WorkCalibrationUser ``` - - Push commit to server +- Push commit to server EXAMPLES $ sfdx hardis:work:task:save @@ -3771,7 +3771,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/defaults/ci/azure-pipelines-checks.yml b/defaults/ci/azure-pipelines-checks.yml index 17fda73e7..a9d1a2d08 100644 --- a/defaults/ci/azure-pipelines-checks.yml +++ b/defaults/ci/azure-pipelines-checks.yml @@ -51,11 +51,11 @@ jobs: - script: | npm install @salesforce/cli --global sf plugins install @salesforce/plugin-packaging + sf plugins install @salesforce/plugin-deploy-retrieve@1.17.6 echo 'y' | sfdx plugins:install sfdx-hardis echo 'y' | sfdx plugins:install sfdx-essentials - echo 'y' | sfdx plugins:install sfdx-git-delta@5.13.3 - sfdx --version - sfdx plugins + echo 'y' | sfdx plugins:install sfdx-git-delta + sf version --verbose --json displayName: "Install SFDX & plugins" # Login & check deployment to PR target branch related org (configuration: https://hardisgroupcom.github.io/sfdx-hardis/salesforce-ci-cd-setup-auth/ ) diff --git a/defaults/ci/azure-pipelines-deployment.yml b/defaults/ci/azure-pipelines-deployment.yml index 2d4e9b99c..1e0707d06 100644 --- a/defaults/ci/azure-pipelines-deployment.yml +++ b/defaults/ci/azure-pipelines-deployment.yml @@ -44,12 +44,12 @@ jobs: - script: | npm install @salesforce/cli --global sf plugins install @salesforce/plugin-packaging + sf plugins install @salesforce/plugin-deploy-retrieve@1.17.6 echo 'y' | sfdx plugins:install sfdx-hardis echo 'y' | sfdx plugins:install sfdx-essentials echo 'y' | sfdx plugins:install sfdmu - echo 'y' | sfdx plugins:install sfdx-git-delta@5.13.3 - sfdx --version - sfdx plugins + echo 'y' | sfdx plugins:install sfdx-git-delta + sf version --verbose --json displayName: "Install SFDX & plugins" # Login & Deploy sfdx sources to related org (configuration: https://hardisgroupcom.github.io/sfdx-hardis/salesforce-ci-cd-setup-auth/ ) diff --git a/defaults/monitoring/azure-pipelines.yml b/defaults/monitoring/azure-pipelines.yml index be93e85ac..3e4ab649c 100644 --- a/defaults/monitoring/azure-pipelines.yml +++ b/defaults/monitoring/azure-pipelines.yml @@ -49,8 +49,10 @@ jobs: - script: | npm install @salesforce/cli -g sf plugins install @salesforce/plugin-packaging + sf plugins install @salesforce/plugin-deploy-retrieve@1.17.6 echo y | sfdx plugins:install sfdx-hardis echo y | sfdx plugins:install sfdx-essentials + sf version --verbose --json workingDirectory: $(System.DefaultWorkingDirectory) displayName: Install @salesforce/cli & sfdx-hardis 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**