diff --git a/src/commiteth_pipeline/pipeline.clj b/src/commiteth_pipeline/pipeline.clj index 3500d3b..cf7adb6 100644 --- a/src/commiteth_pipeline/pipeline.clj +++ b/src/commiteth_pipeline/pipeline.clj @@ -7,9 +7,11 @@ [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 git-clone git/list-changes diff --git a/src/commiteth_pipeline/steps.clj b/src/commiteth_pipeline/steps.clj index 4d5311e..3d3fab3 100644 --- a/src/commiteth_pipeline/steps.clj +++ b/src/commiteth_pipeline/steps.clj @@ -9,6 +9,11 @@ (def repo-uri "https://github.com/status-im/commiteth.git") (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] (shell/bash ctx (:cwd args) "pwd") (git/clone ctx repo-uri repo-branch (:cwd args)))