Josha von Gizycki 5 years ago
commit 2115e42274

@ -3,7 +3,8 @@
[wanijo-pipeline
[wanijo-pipeline :as wp]
[formulare-pipeline :as fp]
[wedder-pipeline :as wdp]]
[wedder-pipeline :as wdp]
[joshavgde-pipeline :as jvgde]]
[wanijo-pipeline.ui-selection :as ui-selection]
[org.httpkit.server :as http-kit]
[lambdacd.runners :as runners]
@ -33,17 +34,25 @@
{:home-dir (home-dir "wedder")
:name "wedder pipeline"}))
(defn joshavgde-pipeline []
(lambdacd/assemble-pipeline jvgde/pipeline-def
{:home-dir (home-dir "joshavgde")
:name "joshavgde pipeline"}))
(defn -main [& args]
(let [wanijo-pipeline (wanijo-pipeline)
formulare-pipeline (formulare-pipeline)
wedder-pipeline (wedder-pipeline)
joshavgde-pipeline (joshavgde-pipeline)
app (ui-selection/ui-routes wanijo-pipeline
formulare-pipeline
wedder-pipeline)]
wedder-pipeline
joshavgde-pipeline)]
;; this starts the pipeline and runs one build after the other.
;; there are other runners and you can define your own as well.
(runners/start-one-run-after-another wanijo-pipeline)
(runners/start-one-run-after-another formulare-pipeline)
(runners/start-one-run-after-another wedder-pipeline)
(runners/start-one-run-after-another joshavgde-pipeline)
;; start the webserver to serve the UI
(http-kit/run-server app {:port 30500})))

@ -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)))

@ -16,14 +16,17 @@
[:ul
[:li [:a {:href "./wanijo/lambdaui/index.html"} "Wanijo"]]
[:li [:a {:href "./formulare/lambdaui/index.html"} "Formulare"]]
[:li [:a {:href "./wedder/lambdaui/index.html"} "Wedder"]]]]]))
[:li [:a {:href "./wedder/lambdaui/index.html"} "Wedder"]]
[:li [:a {:href "./joshavgde/lambdaui/index.html"} "joshavg.de"]]]]]))
(defn ui-routes [wanijo formulare wedder]
(defn ui-routes [wanijo formulare wedder joshavgde]
(let [wanijo-app (lambdaui/ui-for wanijo :contextPath "/wanijo")
formulare-app (lambdaui/ui-for formulare :contextPath "/formulare")
wedder-app (lambdaui/ui-for wedder :contextPath "/wedder")]
wedder-app (lambdaui/ui-for wedder :contextPath "/wedder")
joshavgde-app (lambdaui/ui-for joshavgde :contextPath "/joshavgde")]
(routes
(GET "/" [] (ui-selection))
(context "/wanijo" [] wanijo-app)
(context "/formulare" [] formulare-app)
(context "/wedder" [] wedder-app))))
(context "/wedder" [] wedder-app)
(context "/joshavgde" [] joshavgde-app))))

Loading…
Cancel
Save