Add build triggering on change to master

This commit is contained in:
Teemu Patja 2017-01-25 09:28:28 +02:00
parent a55a31598e
commit 2b84898d75
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
2 changed files with 10 additions and 3 deletions

View File

@ -7,9 +7,11 @@
[lambdacd-git.core :as git])) [lambdacd-git.core :as git]))
(def pipeline-def
`(
manualtrigger/wait-for-manual-trigger (def ^:const pipeline-def
`((either wait-for-git
manualtrigger/wait-for-manual-trigger)
(with-workspace (with-workspace
git-clone git-clone
git/list-changes git/list-changes

View File

@ -9,6 +9,11 @@
(def repo-uri "https://github.com/status-im/commiteth.git") (def repo-uri "https://github.com/status-im/commiteth.git")
(def repo-branch "master") (def repo-branch "master")
(defn wait-for-git [args ctx]
(git/wait-for-git ctx repo-uri
:ref "refs/heads/master"
:ms-between-polls (* 30 1000)))
(defn git-clone [args ctx] (defn git-clone [args ctx]
(shell/bash ctx (:cwd args) "pwd") (shell/bash ctx (:cwd args) "pwd")
(git/clone ctx repo-uri repo-branch (:cwd args))) (git/clone ctx repo-uri repo-branch (:cwd args)))