From: Frank Duncan Date: Mon, 27 Dec 2021 19:43:54 +0000 (-0600) Subject: Change work dir to include project name, keep around X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fproduction;p=candle Change work dir to include project name, keep around --- diff --git a/src/main/aws/aws.lisp b/src/main/aws/aws.lisp index c7fb21d..a6218dd 100644 --- a/src/main/aws/aws.lisp +++ b/src/main/aws/aws.lisp @@ -100,7 +100,10 @@ "--exclude" ".git" (candle:project-dir (candle:job-project job)) - (format nil "~A@~A:~A" *aws-username* (describe-property "PublicIpAddress") *remote-work-dir*))) + (format nil "~A@~A:~A/~A" *aws-username* + (describe-property "PublicIpAddress") + *remote-work-dir* + (candle:project-name (candle:job-project job))))) (let* ((out nil) (code nil)) @@ -118,7 +121,10 @@ "-i" *aws-keyfile* (describe-property "PublicIpAddress") - (format nil "cd ~A ; ~A run --env aws" *remote-work-dir* *remote-candle-location*)) + (format nil "cd ~A/~A ; ~A run --env aws" + *remote-work-dir* + (candle:project-name (candle:job-project job)) + *remote-candle-location*)) :output out-str :error out-str :wait t))))) diff --git a/src/main/base.lisp b/src/main/base.lisp index 793841a..74b35a2 100644 --- a/src/main/base.lisp +++ b/src/main/base.lisp @@ -89,6 +89,18 @@ DESCRIPTION: ; this will get set to nil but we keep them around for historical reference (lame-db:defdbstruct branch name in-git (project :join project) (job :join job)) +(setf (documentation 'project-name 'function) + "PROJECT-NAME PROJECT => NAME + +ARGUMENTS AND VALUES: + + PROJECT: the project + NAME: a string, the name of the job + +DESCRIPTION: + + Returns the name of the project in question.") + (defun project-dir (project) "PROJECT-DIR PROJECT => DIR diff --git a/src/main/package.lisp b/src/main/package.lisp index 90819d0..5ba7d22 100644 --- a/src/main/package.lisp +++ b/src/main/package.lisp @@ -3,7 +3,7 @@ #:server #:add-project #:delete-project #:refresh-project #:list-projects #:project-branch-information #:run #:list-tasks #:*candle-dir* #:*job-system* #:*candle-dir* #:failures #:project-job-information #:get-job-log #:retry-job #:job-project #:project-dir #:process-job-in-system - #:shutdown-system #:*environment* + #:shutdown-system #:*environment* #:project-name #:candle-error #:candle-error-reason) (:documentation "Main candle package.