You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
(ns wanijo-pipeline.formulare-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/formulare.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 lein [target args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) (str "lein " target)))
|
|
|
|
(defn compile [args ctx]
|
|
(lein "compile" args ctx))
|
|
|
|
(defn test [args ctx]
|
|
(lein "test" args ctx))
|
|
|
|
(defn deploy [args ctx]
|
|
(lein "deploy clojars" args ctx))
|
|
|
|
(def pipeline-def
|
|
`((either
|
|
manualtrigger/wait-for-manual-trigger
|
|
wait-for-repo)
|
|
(with-workspace
|
|
clone
|
|
compile
|
|
test
|
|
deploy)))
|