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.
27 lines
758 B
27 lines
758 B
(ns wanijo-pipeline.wedder-pipeline
|
|
(:use [lambdacd.steps.control-flow])
|
|
(:require [lambdacd.steps.manualtrigger :as manualtrigger]
|
|
[lambdacd.steps.shell :as lcd-shell]
|
|
[lambdacd-git.core :as lcd-git]))
|
|
|
|
(defn pull [args ctx]
|
|
(lcd-shell/bash ctx "/opt/wedder" "git pull"))
|
|
|
|
(defn compile [args ctx]
|
|
(lcd-shell/bash ctx "/opt/wedder" "lein uberjar"))
|
|
|
|
(defn kill-previous [args ctx]
|
|
(lcd-shell/bash ctx (:cwd args) "pkill -f wedder")
|
|
{:status :success})
|
|
|
|
(defn deploy [args ctx]
|
|
(lcd-shell/bash ctx "/opt/wedder" "nohup java -jar target/wedder-0.1.0-SNAPSHOT-standalone.jar &"))
|
|
|
|
(def pipeline-def
|
|
`(manualtrigger/wait-for-manual-trigger
|
|
(with-workspace
|
|
pull
|
|
compile
|
|
kill-previous
|
|
deploy)))
|