This is the output I got:
"Successfully created scratch org: oopopoooppooop, username: test+color@example.com"
when I run the following script:
echo "1. Creating Scratch Org"
def orgStatus = bat returnStdout: true, script: "sfdx force:org:create --definitionfile ${PROJECT_SCRATCH_PATH} --durationdays 30 --setalias ${SCRATCH_ORG_NAME} -v DevHub "
if (!orgStatus.contains("Successfully created scratch org")) {
error "Scratch Org creation failed"
} else {
echo orgStatus
}
Now I need to extract scratch org ID and username from the output separately and store it.