Skip to content

Commit

Permalink
fix: append export AWS_ENDPOINT_URL_DEADLINE at end of worker SSM com…
Browse files Browse the repository at this point in the history
…mands (#141)

Signed-off-by: Yutong Li <52769999+YutongLi291@users.noreply.github.com>
  • Loading branch information
YutongLi291 authored Aug 14, 2024
1 parent e768f38 commit cfec139
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/deadline_test_fixtures/deadline/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ def configure_worker_command(self, *, config: DeadlineWorkerConfiguration) -> st
LOG.info(
f"Using AWS_ENDPOINT_URL_DEADLINE: {os.environ.get('AWS_ENDPOINT_URL_DEADLINE')}"
)
cmds.insert(
0,
cmds.append(
f"[System.Environment]::SetEnvironmentVariable('AWS_ENDPOINT_URL_DEADLINE', '{os.environ.get('AWS_ENDPOINT_URL_DEADLINE')}', [System.EnvironmentVariableTarget]::Machine); "
"$env:AWS_ENDPOINT_URL_DEADLINE = [System.Environment]::GetEnvironmentVariable('AWS_ENDPOINT_URL_DEADLINE','Machine')",
)
Expand Down Expand Up @@ -670,8 +669,7 @@ def configure_worker_command(
LOG.info(
f"Using AWS_ENDPOINT_URL_DEADLINE: {os.environ.get('AWS_ENDPOINT_URL_DEADLINE')}"
)
cmds.insert(
0,
cmds.append(
f"runuser -l {config.agent_user} -s /bin/bash -c 'echo export AWS_ENDPOINT_URL_DEADLINE={os.environ.get('AWS_ENDPOINT_URL_DEADLINE')} >> ~/.bashrc'",
)

Expand Down

0 comments on commit cfec139

Please sign in to comment.