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.
64 lines
1.6 KiB
64 lines
1.6 KiB
(ns wanijo-pipeline.wanijo-pipeline
|
|
(:require [lambdacd.steps.manualtrigger :as manualtrigger]
|
|
[lambdacd.steps.control-flow :as cf]
|
|
[lambdacd.steps.shell :as lcd-shell]
|
|
[lambdacd-git.core :as lcd-git]))
|
|
|
|
(def repo-uri "https://gitea.heevyis.ninja/josha/wanijo.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 ancient [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein ancient :all"))
|
|
|
|
(defn compile [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein compile"))
|
|
|
|
(defn test [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein trampoline test"))
|
|
|
|
(defn bikeshed
|
|
"Deprecated"
|
|
[args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein trampoline bikeshed"))
|
|
|
|
(defn eastwood
|
|
"Deprecated"
|
|
[args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein trampoline eastwood"))
|
|
|
|
(defn cloverage [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein trampoline cloverage --no-html"))
|
|
|
|
(defn kibit
|
|
"Deprecated"
|
|
[args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein trampoline kibit"))
|
|
|
|
(defn code-quality [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "lein do eastwood, bikeshed, kibit"))
|
|
|
|
|
|
(def pipeline-def
|
|
`((cf/either
|
|
manualtrigger/wait-for-manual-trigger
|
|
wait-for-repo)
|
|
(cf/with-workspace
|
|
clone
|
|
compile
|
|
(cf/in-parallel
|
|
code-quality
|
|
ancient
|
|
test
|
|
cloverage))))
|