Merge branch 'master' of https://gitea.heevyis.ninja/josha/wanijo-pipeline
commit
2115e42274
@ -0,0 +1,34 @@
|
|||||||
|
(ns wanijo-pipeline.joshavgde-pipeline
|
||||||
|
(:use [lambdacd.steps.control-flow])
|
||||||
|
(:require [lambdacd.steps.manualtrigger :as manualtrigger]
|
||||||
|
[lambdacd.steps.shell :as lcd-shell]
|
||||||
|
[lambdacd-git.core :as lcd-git]))
|
||||||
|
|
||||||
|
(def repo-uri "https://gitea.heevyis.ninja/josha/equilibrium.git")
|
||||||
|
(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]
|
||||||
|
(lcd-shell/bash ctx (:cwd args) "lein equilibrium render"))
|
||||||
|
|
||||||
|
(defn deploy [args ctx]
|
||||||
|
(lcd-shell/bash ctx (:cwd args) "lein equilibrium deploy"))
|
||||||
|
|
||||||
|
(def pipeline-def
|
||||||
|
`((either
|
||||||
|
manualtrigger/wait-for-manual-trigger
|
||||||
|
wait-for-repo)
|
||||||
|
(with-workspace
|
||||||
|
clone
|
||||||
|
render
|
||||||
|
deploy)))
|
Loading…
Reference in new issue