sfdx-hardis 5.10.2-beta202412302338.0 → 5.10.2-beta202412311026.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/defaults/monitoring/.github/workflows/org-monitoring.yml +1 -1
  3. package/defaults/monitoring/azure-pipelines.yml +257 -256
  4. package/defaults/monitoring/bitbucket-pipelines.yml +2 -0
  5. package/lib/commands/hardis/doc/project2markdown.js +9 -1
  6. package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
  7. package/lib/commands/hardis/org/monitor/backup.d.ts +3 -0
  8. package/lib/commands/hardis/org/monitor/backup.js +45 -19
  9. package/lib/commands/hardis/org/monitor/backup.js.map +1 -1
  10. package/lib/common/gitProvider/azureDevops.d.ts +1 -2
  11. package/lib/common/gitProvider/azureDevops.js +0 -15
  12. package/lib/common/gitProvider/azureDevops.js.map +1 -1
  13. package/lib/common/gitProvider/bitbucket.d.ts +1 -2
  14. package/lib/common/gitProvider/bitbucket.js +0 -13
  15. package/lib/common/gitProvider/bitbucket.js.map +1 -1
  16. package/lib/common/gitProvider/gitProviderRoot.d.ts +2 -0
  17. package/lib/common/gitProvider/gitProviderRoot.js +19 -0
  18. package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
  19. package/lib/common/gitProvider/index.d.ts +1 -0
  20. package/lib/common/gitProvider/index.js +1 -0
  21. package/lib/common/gitProvider/index.js.map +1 -1
  22. package/lib/common/gitProvider/utilsMarkdown.d.ts +1 -1
  23. package/lib/common/gitProvider/utilsMarkdown.js +27 -5
  24. package/lib/common/gitProvider/utilsMarkdown.js.map +1 -1
  25. package/lib/common/utils/flowVisualiser/flowParser.js +7 -3
  26. package/lib/common/utils/flowVisualiser/flowParser.js.map +1 -1
  27. package/lib/common/utils/mermaidUtils.js +6 -3
  28. package/lib/common/utils/mermaidUtils.js.map +1 -1
  29. package/oclif.manifest.json +60 -52
  30. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -16,7 +16,9 @@ Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image
16
16
  - Command updates
17
17
  - [hardis:project:deploy:smart](https://sfdx-hardis.cloudity.com/hardis/project/deploy/smart/): Refactor deployment errors parsing: use JSON output instead of text output
18
18
  - [hardis:org:test:apex](https://sfdx-hardis.cloudity.com/hardis/org/test/apex/): Display the number of failed tests in messages and notifications
19
- - [hardis:org:monitor:backup](https://sfdx-hardis.cloudity.com/hardis/org/monitor/backup/): New option **--exclude-namespaces** that can be used with **--full** option
19
+ - [hardis:org:monitor:backup](https://sfdx-hardis.cloudity.com/hardis/org/monitor/backup/):
20
+ - New option **--exclude-namespaces** that can be used with **--full** option
21
+ - New option **--full-apply-filters** that can be used with **--full** option to apply filters anyway
20
22
 
21
23
  - Core enhancements & fixes
22
24
  - Obfuscate some data from text log files
@@ -283,7 +283,7 @@ jobs:
283
283
  - name: Checkout code
284
284
  uses: actions/checkout@v4
285
285
  with:
286
- fetch-depth: 0 # Faster code checkout fetching only latest commit
286
+ fetch-depth: 0
287
287
  ref: ${{ matrix.branch }}
288
288
  persist-credentials: true
289
289
  # Setup node
@@ -11,12 +11,12 @@
11
11
  # Doc & support: https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/
12
12
 
13
13
  schedules:
14
- - cron: "0 4 * * *" # Cron format -> https://crontab.cronhub.io/
15
- always: "true"
16
- branches:
17
- # MANUAL: Add your monitored branches here
18
- include:
19
- - monitoring_my_client__integ_sandbox
14
+ - cron: "0 4 * * *" # Cron format -> https://crontab.cronhub.io/
15
+ always: "true"
16
+ branches:
17
+ # MANUAL: Add your monitored branches here
18
+ include:
19
+ - monitoring_my_client__integ_sandbox
20
20
 
21
21
  pool:
22
22
  vmImage: ubuntu-latest
@@ -28,276 +28,277 @@ variables:
28
28
  value: $[replace(variables['Build.SourceBranch'], 'refs/heads/', '')]
29
29
 
30
30
  jobs:
31
- ##############################################
32
- ### Sfdx Sources Backup + Push new commit ####
33
- ##############################################
34
- - job: BackupSfdxHardis
35
- pool:
36
- vmImage: 'ubuntu-latest'
31
+ ##############################################
32
+ ### Sfdx Sources Backup + Push new commit ####
33
+ ##############################################
34
+ - job: BackupSfdxHardis
35
+ pool:
36
+ vmImage: "ubuntu-latest"
37
37
 
38
- steps:
39
- - checkout: self
40
- persistCredentials: "true"
41
- displayName: Git checkout
38
+ steps:
39
+ - checkout: self
40
+ persistCredentials: "true"
41
+ displayName: Git checkout
42
+ fetchDepth: "0"
42
43
 
43
- - script: |
44
- git config --global user.email "contact@cloudity.com"
45
- git config --global user.name "sfdx-hardis monitoring"
46
- workingDirectory: $(System.DefaultWorkingDirectory)
47
- displayName: Git config
44
+ - script: |
45
+ git config --global user.email "contact@cloudity.com"
46
+ git config --global user.name "sfdx-hardis monitoring"
47
+ workingDirectory: $(System.DefaultWorkingDirectory)
48
+ displayName: Git config
48
49
 
49
- - script: |
50
- npm install @salesforce/cli -g
51
- sf plugins install @salesforce/plugin-packaging
52
- echo y | sf plugins install sfdx-hardis
53
- sf version --verbose --json
54
- workingDirectory: $(System.DefaultWorkingDirectory)
55
- displayName: Install @salesforce/cli & sfdx-hardis
50
+ - script: |
51
+ npm install @salesforce/cli -g
52
+ sf plugins install @salesforce/plugin-packaging
53
+ echo y | sf plugins install sfdx-hardis
54
+ sf version --verbose --json
55
+ workingDirectory: $(System.DefaultWorkingDirectory)
56
+ displayName: Install @salesforce/cli & sfdx-hardis
56
57
 
57
- - script: |
58
- git checkout -b "$BRANCH_NAME"
59
- displayName: Checkout git branch latest commit
60
- env:
61
- CI: "true"
58
+ - script: |
59
+ git checkout -b "$BRANCH_NAME"
60
+ displayName: Checkout git branch latest commit
61
+ env:
62
+ CI: "true"
62
63
 
63
- - script: |
64
- sf hardis:auth:login
65
- sf hardis:org:monitor:backup
66
- displayName: sfdx-hardis login & Backup
67
- env:
68
- # MANUAL: Add your branch related variables here
69
- SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
70
- SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
71
- CI_COMMIT_REF_NAME: $(BRANCH_NAME)
72
- CONFIG_BRANCH: $(BRANCH_NAME)
73
- ORG_ALIAS: $(BRANCH_NAME)
74
- SLACK_TOKEN: $(SLACK_TOKEN)
75
- SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
76
- NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
77
- CI: "true"
78
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
79
- CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
80
- SYSTEM_COLLECTIONURI: $(System.CollectionUri)
81
- SYSTEM_TEAMPROJECT: $(System.TeamProject)
82
- SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
83
- SYSTEM_JOB_ID: $(System.JobId)
84
- SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
85
- BUILD_REPOSITORY_ID: $(Build.Repository.ID)
86
- BUILD_REPOSITORYNAME: $(Build.Repository.Name)
87
- BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
88
- BUILD_BUILD_ID: $(Build.BuildId)
89
- MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
90
- NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
91
- MONITORING_DISABLE: $(MONITORING_DISABLE)
92
- NOTIF_API_URL: $(NOTIF_API_URL)
93
- NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
94
- NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
95
- NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
96
- NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
97
- NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
64
+ - script: |
65
+ sf hardis:auth:login
66
+ sf hardis:org:monitor:backup
67
+ displayName: sfdx-hardis login & Backup
68
+ env:
69
+ # MANUAL: Add your branch related variables here
70
+ SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
71
+ SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
72
+ CI_COMMIT_REF_NAME: $(BRANCH_NAME)
73
+ CONFIG_BRANCH: $(BRANCH_NAME)
74
+ ORG_ALIAS: $(BRANCH_NAME)
75
+ SLACK_TOKEN: $(SLACK_TOKEN)
76
+ SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
77
+ NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
78
+ CI: "true"
79
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
80
+ CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
81
+ SYSTEM_COLLECTIONURI: $(System.CollectionUri)
82
+ SYSTEM_TEAMPROJECT: $(System.TeamProject)
83
+ SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
84
+ SYSTEM_JOB_ID: $(System.JobId)
85
+ SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
86
+ BUILD_REPOSITORY_ID: $(Build.Repository.ID)
87
+ BUILD_REPOSITORYNAME: $(Build.Repository.Name)
88
+ BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
89
+ BUILD_BUILD_ID: $(Build.BuildId)
90
+ MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
91
+ NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
92
+ MONITORING_DISABLE: $(MONITORING_DISABLE)
93
+ NOTIF_API_URL: $(NOTIF_API_URL)
94
+ NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
95
+ NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
96
+ NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
97
+ NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
98
+ NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
98
99
 
99
- - script: |
100
- git status
101
- git add --all
102
- git commit -m "Org state on $(date -u +'%Y-%m-%d %H:%M') for $BRANCH_NAME [skip ci]" || echo "No changes to commit"
103
- git push --set-upstream origin "$BRANCH_NAME"
104
- displayName: Add new commit to Monitoring Repo
105
- workingDirectory: $(System.DefaultWorkingDirectory)
106
- env:
107
- CI: "true"
100
+ - script: |
101
+ git status
102
+ git add --all
103
+ git commit -m "Org state on $(date -u +'%Y-%m-%d %H:%M') for $BRANCH_NAME [skip ci]" || echo "No changes to commit"
104
+ git push --set-upstream origin "$BRANCH_NAME"
105
+ displayName: Add new commit to Monitoring Repo
106
+ workingDirectory: $(System.DefaultWorkingDirectory)
107
+ env:
108
+ CI: "true"
108
109
 
109
- - publish: $(System.DefaultWorkingDirectory)/hardis-report/
110
- artifact: hardis-report-backup
111
- condition: succeededOrFailed()
112
- continueOnError: "true"
113
- displayName: Publish logs as artifacts
110
+ - publish: $(System.DefaultWorkingDirectory)/hardis-report/
111
+ artifact: hardis-report-backup
112
+ condition: succeededOrFailed()
113
+ continueOnError: "true"
114
+ displayName: Publish logs as artifacts
114
115
 
115
- ######################
116
- ### Run Apex Tests ###
117
- ######################
118
- - job: ApexTestsSfdxHardis
119
- dependsOn: BackupSfdxHardis
120
- pool:
121
- vmImage: 'ubuntu-latest'
122
- timeoutInMinutes: "120"
116
+ ######################
117
+ ### Run Apex Tests ###
118
+ ######################
119
+ - job: ApexTestsSfdxHardis
120
+ dependsOn: BackupSfdxHardis
121
+ pool:
122
+ vmImage: "ubuntu-latest"
123
+ timeoutInMinutes: "120"
123
124
 
124
- steps:
125
- - checkout: self
126
- persistCredentials: "true"
127
- displayName: Git checkout
125
+ steps:
126
+ - checkout: self
127
+ persistCredentials: "true"
128
+ displayName: Git checkout
128
129
 
129
- - script: |
130
- npm install @salesforce/cli -g
131
- sf plugins install @salesforce/plugin-packaging
132
- echo y | sf plugins install sfdx-hardis
133
- sf version --verbose --json
134
- workingDirectory: $(System.DefaultWorkingDirectory)
135
- displayName: Install @salesforce/cli & sfdx-hardis
130
+ - script: |
131
+ npm install @salesforce/cli -g
132
+ sf plugins install @salesforce/plugin-packaging
133
+ echo y | sf plugins install sfdx-hardis
134
+ sf version --verbose --json
135
+ workingDirectory: $(System.DefaultWorkingDirectory)
136
+ displayName: Install @salesforce/cli & sfdx-hardis
136
137
 
137
- - script: |
138
- git pull origin "${BRANCH_NAME}"
139
- displayName: Pull git branch latest commit
140
- env:
141
- CI: "true"
138
+ - script: |
139
+ git pull origin "${BRANCH_NAME}"
140
+ displayName: Pull git branch latest commit
141
+ env:
142
+ CI: "true"
142
143
 
143
- - script: |
144
- sf hardis:auth:login
145
- sf hardis:org:test:apex
146
- continueOnError: "true"
147
- displayName: sfdx-hardis login & Apex tests
148
- env:
149
- # MANUAL: Add your branch related variables here
150
- SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
151
- SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
152
- CI_COMMIT_REF_NAME: $(BRANCH_NAME)
153
- CONFIG_BRANCH: $(BRANCH_NAME)
154
- ORG_ALIAS: $(BRANCH_NAME)
155
- SLACK_TOKEN: $(SLACK_TOKEN)
156
- SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
157
- NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
158
- CI: "true"
159
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
160
- CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
161
- SYSTEM_COLLECTIONURI: $(System.CollectionUri)
162
- SYSTEM_TEAMPROJECT: $(System.TeamProject)
163
- SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
164
- SYSTEM_JOB_ID: $(System.JobId)
165
- SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
166
- BUILD_REPOSITORY_ID: $(Build.Repository.ID)
167
- BUILD_REPOSITORYNAME: $(Build.Repository.Name)
168
- BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
169
- BUILD_BUILD_ID: $(Build.BuildId)
170
- MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
171
- NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
172
- MONITORING_DISABLE: $(MONITORING_DISABLE)
173
- NOTIF_API_URL: $(NOTIF_API_URL)
174
- NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
175
- NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
176
- NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
177
- NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
178
- NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
144
+ - script: |
145
+ sf hardis:auth:login
146
+ sf hardis:org:test:apex
147
+ continueOnError: "true"
148
+ displayName: sfdx-hardis login & Apex tests
149
+ env:
150
+ # MANUAL: Add your branch related variables here
151
+ SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
152
+ SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
153
+ CI_COMMIT_REF_NAME: $(BRANCH_NAME)
154
+ CONFIG_BRANCH: $(BRANCH_NAME)
155
+ ORG_ALIAS: $(BRANCH_NAME)
156
+ SLACK_TOKEN: $(SLACK_TOKEN)
157
+ SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
158
+ NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
159
+ CI: "true"
160
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
161
+ CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
162
+ SYSTEM_COLLECTIONURI: $(System.CollectionUri)
163
+ SYSTEM_TEAMPROJECT: $(System.TeamProject)
164
+ SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
165
+ SYSTEM_JOB_ID: $(System.JobId)
166
+ SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
167
+ BUILD_REPOSITORY_ID: $(Build.Repository.ID)
168
+ BUILD_REPOSITORYNAME: $(Build.Repository.Name)
169
+ BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
170
+ BUILD_BUILD_ID: $(Build.BuildId)
171
+ MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
172
+ NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
173
+ MONITORING_DISABLE: $(MONITORING_DISABLE)
174
+ NOTIF_API_URL: $(NOTIF_API_URL)
175
+ NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
176
+ NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
177
+ NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
178
+ NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
179
+ NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
179
180
 
180
- - publish: $(System.DefaultWorkingDirectory)/hardis-report/
181
- condition: succeededOrFailed()
182
- continueOnError: "true"
183
- artifact: hardis-report-apex-tests
184
- displayName: Publish logs as artifacts
181
+ - publish: $(System.DefaultWorkingDirectory)/hardis-report/
182
+ condition: succeededOrFailed()
183
+ continueOnError: "true"
184
+ artifact: hardis-report-apex-tests
185
+ displayName: Publish logs as artifacts
185
186
 
186
- ############################################################
187
- ### Run MegaLinter to detect quality and security issues ###
188
- ############################################################
189
- - job: MegaLinter
190
- dependsOn: BackupSfdxHardis
191
- pool:
192
- vmImage: ubuntu-latest
193
- steps:
194
- - checkout: self
195
- persistCredentials: "true"
196
- displayName: Git checkout
187
+ ############################################################
188
+ ### Run MegaLinter to detect quality and security issues ###
189
+ ############################################################
190
+ - job: MegaLinter
191
+ dependsOn: BackupSfdxHardis
192
+ pool:
193
+ vmImage: ubuntu-latest
194
+ steps:
195
+ - checkout: self
196
+ persistCredentials: "true"
197
+ displayName: Git checkout
197
198
 
198
- - script: |
199
- git config --global user.email "contact@cloudity.com"
200
- git config --global user.name "sfdx-hardis monitoring"
201
- git pull origin "${BRANCH_NAME}"
202
- workingDirectory: $(System.DefaultWorkingDirectory)
203
- displayName: Git config & pull latest commit
199
+ - script: |
200
+ git config --global user.email "contact@cloudity.com"
201
+ git config --global user.name "sfdx-hardis monitoring"
202
+ git pull origin "${BRANCH_NAME}"
203
+ workingDirectory: $(System.DefaultWorkingDirectory)
204
+ displayName: Git config & pull latest commit
204
205
 
205
- # Pull MegaLinter docker image
206
- - script: docker pull oxsecurity/megalinter-salesforce:latest
207
- displayName: Pull MegaLinter
208
- # Run MegaLinter
209
- - script: |
210
- docker run -v $(System.DefaultWorkingDirectory):/tmp/lint \
211
- --env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_) \
212
- -e CI=true \
213
- -e SYSTEM_ACCESSTOKEN=$(System.AccessToken) \
214
- -e GIT_AUTHORIZATION_BEARER=$(System.AccessToken) \
215
- -e API_REPORTER=true \
216
- -e NOTIF_API_URL=$(NOTIF_API_URL) \
217
- -e NOTIF_API_BASIC_AUTH_USERNAME=$(NOTIF_API_BASIC_AUTH_USERNAME) \
218
- -e NOTIF_API_BASIC_AUTH_PASSWORD=$(NOTIF_API_BASIC_AUTH_PASSWORD) \
219
- -e NOTIF_API_METRICS_URL=$(NOTIF_API_METRICS_URL) \
220
- -e NOTIF_API_METRICS_BASIC_AUTH_USERNAME=$(NOTIF_API_METRICS_BASIC_AUTH_USERNAME) \
221
- -e NOTIF_API_METRICS_BASIC_AUTH_PASSWORD=$(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD) \
222
- oxsecurity/megalinter-salesforce:latest
223
- continueOnError: "true"
224
- displayName: Run MegaLinter
206
+ # Pull MegaLinter docker image
207
+ - script: docker pull oxsecurity/megalinter-salesforce:latest
208
+ displayName: Pull MegaLinter
209
+ # Run MegaLinter
210
+ - script: |
211
+ docker run -v $(System.DefaultWorkingDirectory):/tmp/lint \
212
+ --env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_) \
213
+ -e CI=true \
214
+ -e SYSTEM_ACCESSTOKEN=$(System.AccessToken) \
215
+ -e GIT_AUTHORIZATION_BEARER=$(System.AccessToken) \
216
+ -e API_REPORTER=true \
217
+ -e NOTIF_API_URL=$(NOTIF_API_URL) \
218
+ -e NOTIF_API_BASIC_AUTH_USERNAME=$(NOTIF_API_BASIC_AUTH_USERNAME) \
219
+ -e NOTIF_API_BASIC_AUTH_PASSWORD=$(NOTIF_API_BASIC_AUTH_PASSWORD) \
220
+ -e NOTIF_API_METRICS_URL=$(NOTIF_API_METRICS_URL) \
221
+ -e NOTIF_API_METRICS_BASIC_AUTH_USERNAME=$(NOTIF_API_METRICS_BASIC_AUTH_USERNAME) \
222
+ -e NOTIF_API_METRICS_BASIC_AUTH_PASSWORD=$(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD) \
223
+ oxsecurity/megalinter-salesforce:latest
224
+ continueOnError: "true"
225
+ displayName: Run MegaLinter
225
226
 
226
- # Publish Megalinter reports
227
- - publish: $(System.DefaultWorkingDirectory)/megalinter-reports/
228
- condition: succeededOrFailed()
229
- continueOnError: "true"
230
- artifact: megalinter-reports
231
- displayName: Publish reports
227
+ # Publish Megalinter reports
228
+ - publish: $(System.DefaultWorkingDirectory)/megalinter-reports/
229
+ condition: succeededOrFailed()
230
+ continueOnError: "true"
231
+ artifact: megalinter-reports
232
+ displayName: Publish reports
232
233
 
233
- ###################################
234
- ### Run other monitoring checks ###
235
- ###################################
236
- - job: MonitoringChecksSfdxHardis
237
- dependsOn: BackupSfdxHardis
238
- pool:
239
- vmImage: 'ubuntu-latest'
234
+ ###################################
235
+ ### Run other monitoring checks ###
236
+ ###################################
237
+ - job: MonitoringChecksSfdxHardis
238
+ dependsOn: BackupSfdxHardis
239
+ pool:
240
+ vmImage: "ubuntu-latest"
240
241
 
241
- steps:
242
- - checkout: self
243
- persistCredentials: "true"
244
- displayName: Git checkout
242
+ steps:
243
+ - checkout: self
244
+ persistCredentials: "true"
245
+ displayName: Git checkout
245
246
 
246
- - script: |
247
- npm install @salesforce/cli -g
248
- sf plugins install @salesforce/plugin-packaging
249
- echo y | sf plugins install sfdx-hardis
250
- sf version --verbose --json
251
- workingDirectory: $(System.DefaultWorkingDirectory)
252
- displayName: Install @salesforce/cli & sfdx-hardis
247
+ - script: |
248
+ npm install @salesforce/cli -g
249
+ sf plugins install @salesforce/plugin-packaging
250
+ echo y | sf plugins install sfdx-hardis
251
+ sf version --verbose --json
252
+ workingDirectory: $(System.DefaultWorkingDirectory)
253
+ displayName: Install @salesforce/cli & sfdx-hardis
253
254
 
254
- - script: |
255
- git config --global user.email "contact@cloudity.com"
256
- git config --global user.name "sfdx-hardis monitoring"
257
- git pull origin "${BRANCH_NAME}"
258
- displayName: Pull git branch latest commit
259
- env:
260
- CI: "true"
255
+ - script: |
256
+ git config --global user.email "contact@cloudity.com"
257
+ git config --global user.name "sfdx-hardis monitoring"
258
+ git pull origin "${BRANCH_NAME}"
259
+ displayName: Pull git branch latest commit
260
+ env:
261
+ CI: "true"
261
262
 
262
- - script: |
263
- sf hardis:auth:login
264
- sf hardis:org:monitor:all
265
- displayName: sfdx-hardis login & other checks
266
- continueOnError: "true"
267
- env:
268
- # MANUAL: Add your branch related variables here
269
- SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
270
- SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
271
- CI_COMMIT_REF_NAME: $(BRANCH_NAME)
272
- CONFIG_BRANCH: $(BRANCH_NAME)
273
- ORG_ALIAS: $(BRANCH_NAME)
274
- SLACK_TOKEN: $(SLACK_TOKEN)
275
- SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
276
- NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
277
- CI: "true"
278
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
279
- CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
280
- SYSTEM_COLLECTIONURI: $(System.CollectionUri)
281
- SYSTEM_TEAMPROJECT: $(System.TeamProject)
282
- SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
283
- SYSTEM_JOB_ID: $(System.JobId)
284
- SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
285
- BUILD_REPOSITORY_ID: $(Build.Repository.ID)
286
- BUILD_REPOSITORYNAME: $(Build.Repository.Name)
287
- BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
288
- BUILD_BUILD_ID: $(Build.BuildId)
289
- MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
290
- NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
291
- MONITORING_DISABLE: $(MONITORING_DISABLE)
292
- NOTIF_API_URL: $(NOTIF_API_URL)
293
- NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
294
- NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
295
- NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
296
- NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
297
- NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
263
+ - script: |
264
+ sf hardis:auth:login
265
+ sf hardis:org:monitor:all
266
+ displayName: sfdx-hardis login & other checks
267
+ continueOnError: "true"
268
+ env:
269
+ # MANUAL: Add your branch related variables here
270
+ SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX)
271
+ SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: $(SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX)
272
+ CI_COMMIT_REF_NAME: $(BRANCH_NAME)
273
+ CONFIG_BRANCH: $(BRANCH_NAME)
274
+ ORG_ALIAS: $(BRANCH_NAME)
275
+ SLACK_TOKEN: $(SLACK_TOKEN)
276
+ SLACK_CHANNEL_ID: $(SLACK_CHANNEL_ID)
277
+ NOTIF_EMAIL_ADDRESS: $(NOTIF_EMAIL_ADDRESS)
278
+ CI: "true"
279
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
280
+ CI_SFDX_HARDIS_AZURE_TOKEN: $(System.AccessToken)
281
+ SYSTEM_COLLECTIONURI: $(System.CollectionUri)
282
+ SYSTEM_TEAMPROJECT: $(System.TeamProject)
283
+ SYSTEM_JOB_DISPLAY_NAME: $(System.JobDisplayName)
284
+ SYSTEM_JOB_ID: $(System.JobId)
285
+ SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
286
+ BUILD_REPOSITORY_ID: $(Build.Repository.ID)
287
+ BUILD_REPOSITORYNAME: $(Build.Repository.Name)
288
+ BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
289
+ BUILD_BUILD_ID: $(Build.BuildId)
290
+ MONITORING_BACKUP_SKIP_METADATA_TYPES: $(MONITORING_BACKUP_SKIP_METADATA_TYPES)
291
+ NOTIFICATIONS_DISABLE: $(NOTIFICATIONS_DISABLE)
292
+ MONITORING_DISABLE: $(MONITORING_DISABLE)
293
+ NOTIF_API_URL: $(NOTIF_API_URL)
294
+ NOTIF_API_BASIC_AUTH_USERNAME: $(NOTIF_API_BASIC_AUTH_USERNAME)
295
+ NOTIF_API_BASIC_AUTH_PASSWORD: $(NOTIF_API_BASIC_AUTH_PASSWORD)
296
+ NOTIF_API_METRICS_URL: $(NOTIF_API_METRICS_URL)
297
+ NOTIF_API_METRICS_BASIC_AUTH_USERNAME: $(NOTIF_API_METRICS_BASIC_AUTH_USERNAME)
298
+ NOTIF_API_METRICS_BASIC_AUTH_PASSWORD: $(NOTIF_API_METRICS_BASIC_AUTH_PASSWORD)
298
299
 
299
- - publish: $(System.DefaultWorkingDirectory)/hardis-report/
300
- artifact: hardis-report-monitoring
301
- condition: succeededOrFailed()
302
- continueOnError: "true"
303
- displayName: Publish logs as artifacts
300
+ - publish: $(System.DefaultWorkingDirectory)/hardis-report/
301
+ artifact: hardis-report-monitoring
302
+ condition: succeededOrFailed()
303
+ continueOnError: "true"
304
+ displayName: Publish logs as artifacts
@@ -16,6 +16,8 @@ pipelines:
16
16
  ##############################################
17
17
  - step:
18
18
  name: Backup sfdx-hardis
19
+ clone:
20
+ depth: full
19
21
  script:
20
22
  # Install SF Cli & dependencies
21
23
  - npm install --no-cache @salesforce/cli --global
@@ -42,7 +42,7 @@ Can work on any sfdx project, no need for it to be a sfdx-hardis flavored one.
42
42
 
43
43
  Generates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)
44
44
 
45
- To generate Flow documentations, this command requires @mermaid-js/mermaid-cli
45
+ To read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli
46
46
 
47
47
  - Run \`npm install @mermaid-js/mermaid-cli --global\` if puppeteer works in your environment
48
48
  - It can also be run as a docker image
@@ -51,6 +51,13 @@ Both modes will be tried by default, but you can also force one of them by defin
51
51
 
52
52
  _sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_
53
53
 
54
+ If Flow history doc always display a single state, you probably need to update your workflow configuration:
55
+
56
+ - on Gitlab: Env variable [\`GIT_FETCH_EXTRA_FLAGS: --depth 10000\`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)
57
+ - on GitHub: [\`fetch-depth: 0\`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)
58
+ - on Azure: [\`fetchDepth: "0"\`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)
59
+ - on Bitbucket: [\`step: clone: depth: full\`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)
60
+
54
61
  ![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)
55
62
 
56
63
  ![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)
@@ -61,6 +68,7 @@ ${this.htmlInstructions}
61
68
  `;
62
69
  static examples = [
63
70
  '$ sf hardis:doc:project2markdown',
71
+ '$ sf hardis:doc:project2markdown --with-history'
64
72
  ];
65
73
  static flags = {
66
74
  "diff-only": Flags.boolean({