1

I have a CI process runnning in Jenkins. The script is pushing everything to the devHub org and creating a package version. Next, it's trying to create a scratch org but is failing and throwing this message: Oauth client secret of personal connected app?

enter image description here

Any ideas why is it failing?

Command to create the scratch: sfdx force:org:create -f config/project-scratch-def.json -a ${alias} --setdefaultusername --clientid ${CONNECTED_APP_CONSUMER_KEY} -w 10

1

1 Answer 1

0

You need to be authorized to the DevHub org to create a scratch org, following the instructions here https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm

Then, create your scratch org like you try in your screenshot, it should work.

I strongly suggest to use more advanced scripts ( reading sfdx outputs and reusing them in the next commands), like in the example provided by Zack Walter

Don't hesitate to create a Jenkins Shared Library to reuse SFDX commands , avoid too many copy-paste and be able to use Declarative Pipelines instead of the scripted pipeline of the example.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .