From 3a8f9968d414d321c603b9da14c95b9cf8a82db8 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 5 Aug 2025 10:51:23 -0400 Subject: [PATCH 1/2] Mark jumpstarter-client-secret as optional --- tasks/get-lease/get-lease.yaml | 2 +- tasks/release-lease/release-lease.yaml | 2 +- tasks/run-cmd/run-cmd.yaml | 6 +++++- tasks/setup-sa-client/setup-sa-client.yaml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tasks/get-lease/get-lease.yaml b/tasks/get-lease/get-lease.yaml index 23b2822..6d5ed42 100644 --- a/tasks/get-lease/get-lease.yaml +++ b/tasks/get-lease/get-lease.yaml @@ -77,4 +77,4 @@ spec: - description: Workspace for mounting Jumpstarter client files. mountPath: /root/.config/jumpstarter/clients name: jumpstarter-client-secret - \ No newline at end of file + optional: true diff --git a/tasks/release-lease/release-lease.yaml b/tasks/release-lease/release-lease.yaml index 8a86480..2daa2c7 100644 --- a/tasks/release-lease/release-lease.yaml +++ b/tasks/release-lease/release-lease.yaml @@ -60,4 +60,4 @@ spec: workspaces: - mountPath: /root/.config/jumpstarter/clients name: jumpstarter-client-secret - \ No newline at end of file + optional: true diff --git a/tasks/run-cmd/run-cmd.yaml b/tasks/run-cmd/run-cmd.yaml index 87ed7f8..7bfab99 100644 --- a/tasks/run-cmd/run-cmd.yaml +++ b/tasks/run-cmd/run-cmd.yaml @@ -65,7 +65,9 @@ spec: # Show the command that will be executed echo "Running: $(params.jmp-jScript)" - cd /workspace/source + if [ "$(workspaces.source.bound)" == "true" ] ; then + cd "$(workspaces.source.path)" + fi # Execute the script commands within the Jumpstarter shell jmp shell --lease "${JMP_LEASE}" <<-EOF @@ -77,5 +79,7 @@ spec: - description: Workspace for mounting Jumpstarter client files. mountPath: "$(params.home)/.config/jumpstarter/clients" name: jumpstarter-client-secret + optional: true - description: Workspace containing the source code / build images name: source + optional: true diff --git a/tasks/setup-sa-client/setup-sa-client.yaml b/tasks/setup-sa-client/setup-sa-client.yaml index 111c44d..0c4fe97 100644 --- a/tasks/setup-sa-client/setup-sa-client.yaml +++ b/tasks/setup-sa-client/setup-sa-client.yaml @@ -58,4 +58,4 @@ spec: cp ${CONFIG_DIR}/default.yaml $(results.config.path) workspaces: - name: config-dir - description: The workspace which contains Jumpstarter client config file \ No newline at end of file + description: The workspace which contains Jumpstarter client config file From 167fd4f3a122691eda9e6791492f49cc0c34dee7 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 5 Aug 2025 13:07:01 -0400 Subject: [PATCH 2/2] [HACK] do not echo the script --- tasks/run-cmd/run-cmd.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tasks/run-cmd/run-cmd.yaml b/tasks/run-cmd/run-cmd.yaml index 7bfab99..3a1bd0d 100644 --- a/tasks/run-cmd/run-cmd.yaml +++ b/tasks/run-cmd/run-cmd.yaml @@ -62,9 +62,6 @@ spec: # Set the Jumpstarter lease environment variable export JMP_LEASE="$(params.jmp-lease-id)" - # Show the command that will be executed - echo "Running: $(params.jmp-jScript)" - if [ "$(workspaces.source.bound)" == "true" ] ; then cd "$(workspaces.source.path)" fi