From de5ac6b3544db4b83ab07a1b1fa936b95a67596f Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Thu, 2 May 2024 16:06:52 -0500 Subject: [PATCH] Bypass devhub.sh script and just set up devhub to avoid setting default org --- .github/workflows/feature-test-2gp.yml | 3 +++ .github/workflows/feature-test.yml | 2 +- d2x_job_run.sh | 9 ++++++++- docs/troubleshooting.md | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/feature-test-2gp.yml b/.github/workflows/feature-test-2gp.yml index 35c6dd6..ef06150 100644 --- a/.github/workflows/feature-test-2gp.yml +++ b/.github/workflows/feature-test-2gp.yml @@ -7,6 +7,9 @@ on: required: false default: false type: boolean + snapshot: + required: false + type: string secrets: # Either dev-hub-auth-url or dev-hub-username, dev-hub-client-id, and dev-hub-private-key are required diff --git a/.github/workflows/feature-test.yml b/.github/workflows/feature-test.yml index f4ede58..aa0939d 100644 --- a/.github/workflows/feature-test.yml +++ b/.github/workflows/feature-test.yml @@ -1,4 +1,4 @@ -name: 2GP Feature Test +name: Feature Test on: workflow_call: diff --git a/d2x_job_run.sh b/d2x_job_run.sh index a50940d..88e073c 100755 --- a/d2x_job_run.sh +++ b/d2x_job_run.sh @@ -1,5 +1,12 @@ #!/bin/bash -e -/usr/local/bin/devhub.sh +# Authenticate using Auth URL +echo "Authenticating to DevHub using auth url..." + +# Write the DEV_HUB_AUTH_URL to a file +echo $DEV_HUB_AUTH_URL > /tmp/dev_hub_auth_url + +# Authenticate the DevHub +sfdx org login sfdx-url -f /tmp/dev_hub_auth_url -a DevHub -d d2x job run "$@" diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index afe2b14..0ed4ef1 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -6,7 +6,7 @@ #### Error: The template is not valid. muselab-d2x/d2x/.github/workflows/feature-test-unlocked.yml@main (Line: 35, Col: 27): Unexpected value '' -This error can occur when you have a project that uses dependencies and you haven't set up the `CCI_GITHUB_TOKEN` secret for the repository in GitHub or haven't granted the repository permission to an organization level secret. Ensure that the CCI_GITHUB_TOKEN secret is available in the repository under Settings -> Secrets and variables -> Actions. +This error can occur when you have a project that uses dependencies and you haven't set up the `CCI_GITHUB_TOKEN` secret for the repository in GitHub or haven't granted the repository permission to an organization level secret. Ensure that the `CCI_GITHUB_TOKEN` secret is available in the repository under Settings -> Secrets and variables -> Actions. #### _In Set Commit Status Step_ gh: Not Found (HTTP 404)