GitHub
- Pre-requisites
- Run sfdx-hardis configuration command
- Define sfdx-hardis environment variables
- Schedule the monitoring job
Pre-requisites
None
Run sfdx-hardis configuration command
- Run command Configuration -> Configure Org Monitoring in VsCode SFDX Hardis, then follow instructions.
Define sfdx-hardis environment variables
- Go to Repository -> Settings > Secret and variables -> Actions (you must have Github authorizations to access this menu)
- For each variable sfdx-hardis command Configure org monitoring tells you to define, click on New repository secret, with name and value given in sfdx-hardis command logs
Update org-monitoring.yml
- Open .github/workflows/org-monitoring.yml in VsCode and update all places where
MANUAL
is found- environment variables
Examples:
env:
# MANUAL: Update variables below !
SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX: ${{ secrets.SFDX_CLIENT_ID_MONITORING_MY_CLIENT__INTEG_SANDBOX}}
SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX: ${{ secrets.SFDX_CLIENT_KEY_MONITORING_MY_CLIENT__INTEG_SANDBOX}}
SFDX_DEPLOY_WAIT_MINUTES: 120 # Override if necessary
- Commit and push
Schedule the monitoring job
Schedule is already included within org-monitoring.yml.
Default is everyday at midnight, but you can update the CRON expression.
on:
push:
# Automatically run every day at midnight
schedule:
- cron: "0 0 * * *" # Cron format -> https://crontab.cronhub.io/