|
|
@ -4,18 +4,31 @@
|
|
|
|
[lambdacd.steps.shell :as lcd-shell]
|
|
|
|
[lambdacd.steps.shell :as lcd-shell]
|
|
|
|
[lambdacd-git.core :as lcd-git]))
|
|
|
|
[lambdacd-git.core :as lcd-git]))
|
|
|
|
|
|
|
|
|
|
|
|
(defn pull [args ctx]
|
|
|
|
(def repo-uri "https://gitea.heevyis.ninja/josha/equilibrium.git")
|
|
|
|
(lcd-shell/bash ctx "/opt/wedder" "git pull"))
|
|
|
|
(def repo-branch "master")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn wait-for-repo [args ctx]
|
|
|
|
|
|
|
|
(lcd-git/wait-for-git ctx
|
|
|
|
|
|
|
|
repo-uri
|
|
|
|
|
|
|
|
:ref (str "refs/heads/" repo-branch)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn clone [args ctx]
|
|
|
|
|
|
|
|
(let [revision (:revision args)
|
|
|
|
|
|
|
|
cwd (:cwd args)
|
|
|
|
|
|
|
|
ref (or revision repo-branch)]
|
|
|
|
|
|
|
|
(lcd-git/clone ctx repo-uri ref cwd)))
|
|
|
|
|
|
|
|
|
|
|
|
(defn render [args ctx]
|
|
|
|
(defn render [args ctx]
|
|
|
|
(lcd-shell/bash ctx "/opt/wedder" "lein equilibrium render"))
|
|
|
|
(lcd-shell/bash ctx (:cwd args) "lein equilibrium render"))
|
|
|
|
|
|
|
|
|
|
|
|
(defn deploy [args ctx]
|
|
|
|
(defn deploy [args ctx]
|
|
|
|
(lcd-shell/bash ctx (:cwd args) "lein equilibrium deploy"))
|
|
|
|
(lcd-shell/bash ctx (:cwd args) "lein equilibrium deploy"))
|
|
|
|
|
|
|
|
|
|
|
|
(def pipeline-def
|
|
|
|
(def pipeline-def
|
|
|
|
`(manualtrigger/wait-for-manual-trigger
|
|
|
|
`((either
|
|
|
|
|
|
|
|
manualtrigger/wait-for-manual-trigger
|
|
|
|
|
|
|
|
wait-for-repo)
|
|
|
|
(with-workspace
|
|
|
|
(with-workspace
|
|
|
|
pull
|
|
|
|
clone
|
|
|
|
render
|
|
|
|
render
|
|
|
|
deploy)))
|
|
|
|
deploy)))
|
|
|
|