From 70bbbb2ca879af28afb8d7b739e4379907fd426a Mon Sep 17 00:00:00 2001 From: Danilo Sousa Date: Fri, 19 Feb 2016 18:11:25 -0200 Subject: create `githubrepo` hook documentation in README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index a130961..21a0956 100644 --- a/README.md +++ b/README.md @@ -525,6 +525,39 @@ hooks: timeout: 120 ``` +### githubrepo + +This hook configures the repository `remote` and _push_ the code when the specified event is triggerd. If the `username` and `password` are not provided, the `Rugged::Credentials::SshKeyFromAgent` will be used. + +`githubrepo` hook recognizes following configuration keys: + + * `remote_repo`: the remote repository to be pushed to. + * `username`: username for repository auth. + * `password`: password for repository auth. + +When using groups repositories, the remotes should be passed in the `groups` config for each group. + +``` yaml +vars: {} +groups: + routers: git@git.intranet:oxidized/routers.git + switches: git@git.intranet:oxidized/switches.git + firewalls: git@git.intranet:oxidized/firewalls.git +``` + + +## Hook configuration example + +``` yaml +hooks: + push_to_gitlab: + type: githubrepo + events: [node_success, post_store] + remote_repo: git@git.intranet:oxidized/test.git + username: user + password: pass +``` + # Ruby API The following objects exist in Oxidized. -- cgit v1.2.1