From ee5126ed2f68f79ef99940766ce552e229e11fbb Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Thu, 2 May 2024 16:21:52 -0500 Subject: [PATCH] Fix incorrect COPY in Dockerfile and don't set default org if no cumulusci.yml file exists --- Dockerfile | 4 ++-- d2x_job_run.sh | 12 ------------ devhub.sh | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100755 d2x_job_run.sh diff --git a/Dockerfile b/Dockerfile index d025d85..15f31ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,9 @@ RUN pip install --no-cache-dir --upgrade pip pip-tools \ pip --no-cache-dir install git+https://github.com/muselab-d2x/d2x-cli@main cookiecutter # Copy devhub auth script and make it executable -COPY devhub.sh /usr/local/bin/d2x_job_run.sh +COPY d2x_job_run.sh /usr/local/bin/d2x_job_run.sh COPY devhub.sh /usr/local/bin/devhub.sh -RUN chmod +x /usr/local/bin/d2x_job_run.sh +RUN chmod +x /usr/local/bddin/d2x_job_run.sh RUN chmod +x /usr/local/bin/devhub.sh # Create d2x user diff --git a/d2x_job_run.sh b/d2x_job_run.sh deleted file mode 100755 index 88e073c..0000000 --- a/d2x_job_run.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e - -# 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/devhub.sh b/devhub.sh index 1135b83..4edb854 100755 --- a/devhub.sh +++ b/devhub.sh @@ -83,7 +83,7 @@ else [[ -f /tmp/target_org_auth_url ]] && rm /tmp/target_org_auth_url fi -if [ "`whoami`" == "d2x" ]; then +if [ "`whoami`" == "d2x" && -f "cumulusci.yml" ]; then echo "Setting dev as the default org" cci org default dev fi