This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Git
Florian Sellmayr edited this page Sep 19, 2015
·
3 revisions
Import: (:require [lambdacd.steps.git :as git])
Step that waits for a commit on the specified branch in the specified repository. Polls the repository in regular intervals.
Options are key-value pairs:
-
:ms-between-polls
: The number or milliseconds to wait between two polling requests to the repository (default: 10000 i.e. 10 seconds)
Returns:
-
:revision
The revision of the most recent commit
(defn wait-for-commit-on-lambdacd-repo [args ctx]
(git/wait-for-git ctx "[email protected]:flosell/lambdacd.git" :ms-between-polls 1000))
Same as wait-for-git
but outputs details about the new commits it found.
Returns:
-
:revision
The revision of the most recent commit -
:commits
Information on the new commits.
(defn wait-for-commit-on-lambdacd-repo [args ctx]
(git/wait-with-details ctx "[email protected]:flosell/lambdacd.git" :ms-between-polls 1000))
Returns a step that executes the given steps with a workspace where the given repository is checked out. Works best if the step before is wait-for-git
as then it'll check out the revision found by wait-for-git.
Input args
:
-
:revision
The revision to check out. If not given, will check out the HEAD of the master branch
args
passed on to child steps:
-
:cwd
contains the working directory where the repository is checked out
(defn some-step [args ctx]
(shell/bash ctx (:cwd args) "./script-in-repo.sh"))
(defn with-repo [& steps]
(git/with-git "[email protected]:flosell/lambdacd.git" steps))