0

We are working on implementation of ci/cd for 2nd generation package. Using CLI we want to:

  1. Create scratch org and push the source from the branch to the scratch org.
  2. Create package version from the branch source.

Is it possible?

3
  • Generally speaking, yes, it is possible. What have you tried so far?
    – sfdcfox
    Feb 26 '20 at 15:58
  • 2
    Have you looked at the Package Development Model module on Trailhead, and the various CI/CD examples that Salesforce provides? This one is for BitBucket.
    – David Reed
    Feb 26 '20 at 16:00
  • A similar discussion happened earlier this week on this post Feb 26 '20 at 22:21
0

we can after a trigger on branch...

  1. Authorize a Devhub org: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm

  2. let the pipeline run:

    sfdx force:org:create -s -f config/project-scratch-def.json -a

  3. wait for the scrach org to the created and once done let the pipeline run...

    sfdx force:source:push

I would strongly recommend using the jenkinsfile sample: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ci_jenkins_code.htm

Hope this helps!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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