I am currently doing a POC for the Continuous Integration in Salesforce DX through Jenkins. My Jenkins Setup is such that the job-run creates an on-demand agent which executes the job and gets scraped off at the end. The job runs fine for me and executes the following stages defined in my Jenkinsfile: Clones the repo from bitbucket Creates a Scratch Org Push's code to the scratch org Runs some apex tests.
The problem is, when I login to the DevHub form my local CLI (Different from the Jenkins Server) and try to list the scratch org, it does not list the Scratch Org created through Jenkins although I can see them through the UI.
Am I missing something here? In my use case I would want the Salesforce Developer to be able to login and get inside the Scratch Org create by Jenkins and do the development work.
Have used the following sample Jenkinsfile for reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ci_jenkins_code.htm
And, the sample source code used is: https://github.com/forcedotcom/sfdx-simple
Appreciate your help on this please