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

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.