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.
- package/CHANGELOG.md +3 -1
- package/defaults/monitoring/.github/workflows/org-monitoring.yml +1 -1
- package/defaults/monitoring/azure-pipelines.yml +257 -256
- package/defaults/monitoring/bitbucket-pipelines.yml +2 -0
- package/lib/commands/hardis/doc/project2markdown.js +9 -1
- package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
- package/lib/commands/hardis/org/monitor/backup.d.ts +3 -0
- package/lib/commands/hardis/org/monitor/backup.js +45 -19
- package/lib/commands/hardis/org/monitor/backup.js.map +1 -1
- package/lib/common/gitProvider/azureDevops.d.ts +1 -2
- package/lib/common/gitProvider/azureDevops.js +0 -15
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/gitProvider/bitbucket.d.ts +1 -2
- package/lib/common/gitProvider/bitbucket.js +0 -13
- package/lib/common/gitProvider/bitbucket.js.map +1 -1
- package/lib/common/gitProvider/gitProviderRoot.d.ts +2 -0
- package/lib/common/gitProvider/gitProviderRoot.js +19 -0
- package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
- package/lib/common/gitProvider/index.d.ts +1 -0
- package/lib/common/gitProvider/index.js +1 -0
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/gitProvider/utilsMarkdown.d.ts +1 -1
- package/lib/common/gitProvider/utilsMarkdown.js +27 -5
- package/lib/common/gitProvider/utilsMarkdown.js.map +1 -1
- package/lib/common/utils/flowVisualiser/flowParser.js +7 -3
- package/lib/common/utils/flowVisualiser/flowParser.js.map +1 -1
- package/lib/common/utils/mermaidUtils.js +6 -3
- package/lib/common/utils/mermaidUtils.js.map +1 -1
- package/oclif.manifest.json +60 -52
- 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/):
|
|
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
|
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
36
|
-
|
|
31
|
+
##############################################
|
|
32
|
+
### Sfdx Sources Backup + Push new commit ####
|
|
33
|
+
##############################################
|
|
34
|
+
- job: BackupSfdxHardis
|
|
35
|
+
pool:
|
|
36
|
+
vmImage: "ubuntu-latest"
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
steps:
|
|
39
|
+
- checkout: self
|
|
40
|
+
persistCredentials: "true"
|
|
41
|
+
displayName: Git checkout
|
|
42
|
+
fetchDepth: "0"
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
- script: |
|
|
59
|
+
git checkout -b "$BRANCH_NAME"
|
|
60
|
+
displayName: Checkout git branch latest commit
|
|
61
|
+
env:
|
|
62
|
+
CI: "true"
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
######################
|
|
117
|
+
### Run Apex Tests ###
|
|
118
|
+
######################
|
|
119
|
+
- job: ApexTestsSfdxHardis
|
|
120
|
+
dependsOn: BackupSfdxHardis
|
|
121
|
+
pool:
|
|
122
|
+
vmImage: "ubuntu-latest"
|
|
123
|
+
timeoutInMinutes: "120"
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
steps:
|
|
126
|
+
- checkout: self
|
|
127
|
+
persistCredentials: "true"
|
|
128
|
+
displayName: Git checkout
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
- script: |
|
|
139
|
+
git pull origin "${BRANCH_NAME}"
|
|
140
|
+
displayName: Pull git branch latest commit
|
|
141
|
+
env:
|
|
142
|
+
CI: "true"
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
###################################
|
|
235
|
+
### Run other monitoring checks ###
|
|
236
|
+
###################################
|
|
237
|
+
- job: MonitoringChecksSfdxHardis
|
|
238
|
+
dependsOn: BackupSfdxHardis
|
|
239
|
+
pool:
|
|
240
|
+
vmImage: "ubuntu-latest"
|
|
240
241
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
steps:
|
|
243
|
+
- checkout: self
|
|
244
|
+
persistCredentials: "true"
|
|
245
|
+
displayName: Git checkout
|
|
245
246
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
- publish: $(System.DefaultWorkingDirectory)/hardis-report/
|
|
301
|
+
artifact: hardis-report-monitoring
|
|
302
|
+
condition: succeededOrFailed()
|
|
303
|
+
continueOnError: "true"
|
|
304
|
+
displayName: Publish logs as artifacts
|
|
@@ -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
|
|
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
|

|
|
55
62
|
|
|
56
63
|

|
|
@@ -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({
|