add ! for sideeffect
This commit is contained in:
parent
66603630f2
commit
96b3a6a7c6
4 changed files with 16 additions and 16 deletions
|
@ -22,12 +22,12 @@
|
||||||
:debug false
|
:debug false
|
||||||
:dry-run false})
|
:dry-run false})
|
||||||
|
|
||||||
(defn-spec clean-build-dir nil?
|
(defn-spec clean-build-dir! nil?
|
||||||
[devops ::devops]
|
[devops ::devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(i/execute (domain/clean-build-dir-command final) final)))
|
(i/execute! (domain/clean-build-dir-command final) final)))
|
||||||
|
|
||||||
(defn-spec create-build-dir nil?
|
(defn-spec create-build-dir! nil?
|
||||||
[devops ::devops]
|
[devops ::devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(i/execute (domain/create-build-dir-command final) final)))
|
(i/execute! (domain/create-build-dir-command final) final)))
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
(def default
|
(def default
|
||||||
(merge d/default {}))
|
(merge d/default {}))
|
||||||
|
|
||||||
(defn-spec dbuild nil?
|
(defn-spec container-build! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(d/create-build-dir final)
|
(d/create-build-dir! final)
|
||||||
(d/create-build-dir final)
|
(d/create-build-dir! final)
|
||||||
(apply t/shell (domain/copy-image-command final))
|
(apply t/shell (domain/copy-image-command final))
|
||||||
(apply t/shell (domain/dbuild-command final))))
|
(apply t/shell (domain/dbuild-command final))))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
[babashka.tasks :as t]
|
[babashka.tasks :as t]
|
||||||
[dda.build.devops.domain :as d]))
|
[dda.build.devops.domain :as d]))
|
||||||
|
|
||||||
(defn-spec execute nil?
|
(defn-spec execute! nil?
|
||||||
[command seq?
|
[command seq?
|
||||||
devops ::d/devops]
|
devops ::d/devops]
|
||||||
(let [{:keys [dry-run debug]} devops]
|
(let [{:keys [dry-run debug]} devops]
|
||||||
|
|
|
@ -13,50 +13,50 @@
|
||||||
(defn-spec clean-build-dir! nil?
|
(defn-spec clean-build-dir! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(i/execute (domain/clean-build-dir-command final) final)))
|
(i/execute! (domain/clean-build-dir-command final) final)))
|
||||||
|
|
||||||
(defn-spec copy-terragrunt! nil?
|
(defn-spec copy-terragrunt! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(doseq [c (domain/copy-terragrunt-command final)]
|
(doseq [c (domain/copy-terragrunt-command final)]
|
||||||
(i/execute c final))))
|
(i/execute! c final))))
|
||||||
|
|
||||||
(defn-spec terragrunt-plan! nil?
|
(defn-spec terragrunt-plan! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(doseq [c (domain/terragrunt-plan-command final)]
|
(doseq [c (domain/terragrunt-plan-command final)]
|
||||||
(i/execute c final))))
|
(i/execute! c final))))
|
||||||
|
|
||||||
(defn-spec terragrunt-apply! nil?
|
(defn-spec terragrunt-apply! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(doseq [c (domain/terragrunt-apply-command final)]
|
(doseq [c (domain/terragrunt-apply-command final)]
|
||||||
(i/execute c final))))
|
(i/execute! c final))))
|
||||||
|
|
||||||
(defn-spec terragrunt-destroy! nil?
|
(defn-spec terragrunt-destroy! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(let [final (merge default devops)]
|
(let [final (merge default devops)]
|
||||||
(doseq [c (domain/terragrunt-destroy-command final)]
|
(doseq [c (domain/terragrunt-destroy-command final)]
|
||||||
(i/execute c final))))
|
(i/execute! c final))))
|
||||||
|
|
||||||
(defn-spec plan! nil?
|
(defn-spec plan! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(clean-build-dir! devops)
|
(clean-build-dir! devops)
|
||||||
(d/create-build-dir devops)
|
(d/create-build-dir! devops)
|
||||||
(copy-terragrunt! devops)
|
(copy-terragrunt! devops)
|
||||||
(terragrunt-plan! devops))
|
(terragrunt-plan! devops))
|
||||||
|
|
||||||
(defn-spec apply! nil?
|
(defn-spec apply! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(clean-build-dir! devops)
|
(clean-build-dir! devops)
|
||||||
(d/create-build-dir devops)
|
(d/create-build-dir! devops)
|
||||||
(copy-terragrunt! devops)
|
(copy-terragrunt! devops)
|
||||||
(terragrunt-apply! devops))
|
(terragrunt-apply! devops))
|
||||||
|
|
||||||
(defn-spec destroy! nil?
|
(defn-spec destroy! nil?
|
||||||
[devops ::d/devops]
|
[devops ::d/devops]
|
||||||
(clean-build-dir! devops)
|
(clean-build-dir! devops)
|
||||||
(d/create-build-dir devops)
|
(d/create-build-dir! devops)
|
||||||
(copy-terragrunt! devops)
|
(copy-terragrunt! devops)
|
||||||
(terragrunt-destroy! devops))
|
(terragrunt-destroy! devops))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue