cp * is not working
This commit is contained in:
parent
e0b5eb0ee3
commit
6046554be4
4 changed files with 14 additions and 7 deletions
|
@ -4,7 +4,7 @@
|
|||
[dda.build.devops.domain :as d]))
|
||||
|
||||
(defn-spec execute nil?
|
||||
[command string?
|
||||
[command seq?
|
||||
devops ::d/devops]
|
||||
(let [{:keys [dry-run debug]} devops]
|
||||
(when debug
|
||||
|
|
|
@ -12,5 +12,10 @@
|
|||
(let [final (merge default devops)]
|
||||
(i/execute (domain/clean-build-dir-command final) final)
|
||||
(d/create-build-dir final)
|
||||
(i/execute (domain/copy-terragrunt-command final) final)
|
||||
(i/execute ["ls" "-la"] final)
|
||||
(doseq [c (domain/copy-terragrunt-command final)]
|
||||
(try (i/execute c final)
|
||||
(catch Exception e (str "caught exception: " (.getMessage e)))))
|
||||
(i/execute [{:dir "../../../target/test/statistics"} "terragrunt" "init"] final)
|
||||
(i/execute [{:dir "../../../target/test/statistics"} "terragrunt" "plan"] final)
|
||||
))
|
||||
|
|
|
@ -13,5 +13,7 @@
|
|||
|
||||
(defn-spec copy-terragrunt-command seq?
|
||||
[devops ::devops]
|
||||
(let [{:keys [module]} devops]
|
||||
["cp" "." (d/build-path devops) "&&" "cp" module (d/build-path devops)]))
|
||||
(let [{:keys [module]} devops
|
||||
devops-wo-module (dissoc devops :module)]
|
||||
[["cp" "*.hcl" (d/build-path devops-wo-module)]
|
||||
["cp" "-r" module (d/build-path devops-wo-module)]]))
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
:dry-run false}))))
|
||||
|
||||
(deftest should-calculate-copy-terragrunt-command
|
||||
(is (= ["cp" "." "../../target/test/statistics" "&&"
|
||||
"cp" "statistics" "../../target/test/statistics"]
|
||||
(is (= [["cp" "*.hcl" "../../target/test"]
|
||||
["cp" "-r" "statistics" "../../target/test"]]
|
||||
(cut/copy-terragrunt-command {:name "test"
|
||||
:module "statistics"
|
||||
:project-root-path "../.."
|
||||
|
|
Loading…
Reference in a new issue