Change work dir to include project name, keep around production
authorFrank Duncan <frank@kank.net>
Mon, 27 Dec 2021 19:43:54 +0000 (13:43 -0600)
committerFrank Duncan <frank.d.duncan@gmail.com>
Mon, 27 Dec 2021 19:48:12 +0000 (13:48 -0600)
src/main/aws/aws.lisp
src/main/base.lisp
src/main/package.lisp

index c7fb21dae85fde7d9df6b19fa58c8539619b5464..a6218dd4f6118efbc64c9a53f6428a2adc2496eb 100644 (file)
    "--exclude"
    ".git"
    (candle:project-dir (candle:job-project job))
    "--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))
  (let*
   ((out nil)
    (code nil))
         "-i"
         *aws-keyfile*
         (describe-property "PublicIpAddress")
         "-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)))))
        :output out-str
        :error out-str
        :wait t)))))
index 793841a00bd19ebc2e654bb3b3f5400e04967252..74b35a2c37945ff696d336140369ea090b9389ac 100644 (file)
@@ -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))
 
 ; 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
 
 (defun project-dir (project)
  "PROJECT-DIR PROJECT => DIR
 
index 90819d0592a1b51c051583209ef78315410b75f1..5ba7d22ddbd7a5e97f72578922d7ecdd0f56c136 100644 (file)
@@ -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
   #: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.
 
   #:candle-error #:candle-error-reason)
  (:documentation "Main candle package.