I am setting up a CI/CD with bitbucket/jenkins using SFDX. I want each developer to have their own scratch org if they push to their feature branch.
I have to maintain if the scratch org is expired a new scratch org should be provisioned for the developer without showing the error message
stage('Create Test Scratch Org') {
rc = command "${toolbelt}/sfdx force:org:create --targetdevhubusername HubOrg --setdefaultusername --definitionfile config/project-scratch-def.json --setalias ciorg --wait 10 --durationdays 1"
if (rc != 0) {
error 'Salesforce test scratch org creation failed.'
}
}
Thanks in advance.