summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDanilo Sousa <dsgoncalves@uoldiveo.com>2016-02-19 18:11:25 -0200
committerDanilo Sousa <dsgoncalves@uoldiveo.com>2016-02-19 18:15:10 -0200
commit70bbbb2ca879af28afb8d7b739e4379907fd426a (patch)
tree7ad8be9bf808a097989b38a18fe24166d49a2b8a /README.md
parent66a0c3261611f737e5f36527da4ba0d13d70e092 (diff)
create `githubrepo` hook documentation in README
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
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.