I have a SFDX project on github which is linked to circleci. I'm using docker executor in circleci. Now I don't want to create a new scratch org everytime my workflow runs on circleci after a commit.
I want to use one scratch org and make recurring deployments to that. Now the easiest way for authenticating the scratch org everytime on the docker executor is to use the url based authentication flow for scratch orgs. This requires me to push a file (which contains the authentication URL) to my docker container which I can then access through sfdx force:auth:jwt:grant. Now I have two challenges here, I'm not sure how to retrieve my docker container id or name. Since that is required for my "docker cp" command. Below are related lines from the snippet of my config.yml and the related script file.
version: 2 jobs: build: working_directory: ~/SalesforceApp docker: - image: circleci/node:latest steps: - checkout - setup_remote_docker
sfdx force:auth:jwt:grant --clientid $SFDC_CONSUMER_KEY --jwtkeyfile keys/server.key --username $SFDC_USERNAME --setdefaultdevhubusername -a DevHub
Not sure if my understanding of docker executor is totally correct at this stage so apologies for that in advance as I'm still new to the world of CI/CD.