0

So, I am trying to create Heroku pipeline from VSCode. I ran the command ./setup.sh

In my setup.sh file I've set HEROKU_APP_NAME and verified "Usernames or aliases of the orgs you're using" and also set the PACKAGE_NAME as well. For now, I'm not authorising the Github yet.

When the command ./setup.sh is ran, its creating the apps in my Github (developer, staging, production) but its failing to create Pipeline. Everytime I run it, it stops with error

ERROR: Did not find 'Sfdx Auth Url' output from command: sfdx force:org:display --verbose -u DevOrg

or

ERROR: Did not find 'Sfdx Auth Url' output from command: sfdx force:org:display --verbose -u DevHub

If I run these commands sfdx force:org:display --verbose -u DevHub separately, I am getting the Sfdx Auth Url output as well.

enter image description here

I tried to change the line devSfdxAuthUrl=$(sfdx force:org:display --verbose -u DevOrg | grep "Sfdx Auth Url" | awk '{ print $4 }') to devSfdxAuthUrl = "actual Sfdx Auth Url return from above command in pic" but with no luck.

Its also showing that Setting SFDX_CREATE_PACKAGE_VERSION false as below

Setting SFDX_CREATE_PACKAGE_VERSION and restarting ⬢ sagi20190519-dev... done, v8 SFDX_CREATE_PACKAGE_VERSION: true

Setting SFDX_CREATE_PACKAGE_VERSION and restarting ⬢ sagi20190519-staging... done, v8 SFDX_CREATE_PACKAGE_VERSION: false

Setting SFDX_CREATE_PACKAGE_VERSION and restarting ⬢ sagi20190519-prod... done, v8 SFDX_CREATE_PACKAGE_VERSION: false

Please help me understand how to resolve this issue.

  • Please include the (relevant portions of the) actual script you are running. – David Reed May 19 at 17:01
  • Hi David, thanks for replying. I actually was able to resolve the issue by changing the RegEx. I've changed the condition check from if [[ "$devSfdxAuthUrl" =~ ^force://.*\.salesforce\.com$ ]]; to if [[ "$devSfdxAuthUrl" =~ ^force://.*\.salesforce\.com/$ ]];. When script ran and it fetches scratch org url, instead of checking for ....salesforce.com/, I was just checing for .....salesforce.com (/ at the end). – Lokesh Sagi May 21 at 10:21
  • That's valuable information. Would you consider writing an answer to your own question to help other members of the community? – David Reed May 21 at 11:39
0

So, when the script ran and fetching the URLs of HubOrg and Scratch Orgs, for HubOrg, the return url is in ....salesforce.com format and for scratch orgs, the url is in ....salesforce.com/ format.

Before modifying, my RegEx was like below for both Devhub and Scratch orgs

Devhub: if [[ "$devHubSfdxAuthUrl" =~ ^force://.*.salesforce.com$ ]];

Scratch org: if [[ "$devSfdxAuthUrl" =~ ^force://.*.salesforce.com$ ]];

So, I've modified the scratch org's RegEx to ('/' at the end)

if [[ "$devSfdxAuthUrl" =~ ^force://.*.salesforce.com/$ ]];

We can also try and remove the last char of returned 'Sfdx Auth Url'.

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.