diff options
author | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 18:11:25 -0200 |
---|---|---|
committer | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 18:15:10 -0200 |
commit | 70bbbb2ca879af28afb8d7b739e4379907fd426a (patch) | |
tree | 7ad8be9bf808a097989b38a18fe24166d49a2b8a /README.md | |
parent | 66a0c3261611f737e5f36527da4ba0d13d70e092 (diff) |
create `githubrepo` hook documentation in README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -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. |