summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2016-03-13 11:21:54 +0100
committerOliver Poignant <oliver@poignant.se>2016-03-13 11:21:54 +0100
commita13fb8984037394af067e867c7b8fb0df082841f (patch)
tree5c8d23c286c7401f89a14dd91e83d6043ce2bdf0 /docs
parent997e40d045ee710b74a9b35afaa5dc26b7c66bc0 (diff)
parent71f22c557eece1a0e991c29c54b8d00b5cee6673 (diff)
downloadGit-Auto-Deploy-a13fb8984037394af067e867c7b8fb0df082841f.zip
Git-Auto-Deploy-a13fb8984037394af067e867c7b8fb0df082841f.tar.gz
Git-Auto-Deploy-a13fb8984037394af067e867c7b8fb0df082841f.tar.bz2
Merge branch 'etlweather-master'
Diffstat (limited to 'docs')
-rw-r--r--docs/Configuration.md52
1 files changed, 45 insertions, 7 deletions
diff --git a/docs/Configuration.md b/docs/Configuration.md
index c1be297..b911048 100644
--- a/docs/Configuration.md
+++ b/docs/Configuration.md
@@ -32,14 +32,25 @@ Repository configurations are comprised of the following elements:
With filter, it is possible to trigger the deploy only if the criteria are met.
For example, deploy on `push` to the `master` branch only, ignore other branches.
-Filters are defined by providing an `action` and/or a `ref` element (most the
-time both would be used in the filter )
+Filters are defined by providing keys/values to be looked up in the original
+data sent by the web hook.
-A special filter syntax also exist to take care of GitHub pull-requests. See
-[Continuous Delivery via Pull requests](./Continuous Delivery via Pull requests.md)
-for details on how it works.
+For example, GitLab web hook data looks like this:
+
+```json
+ {
+ "object_kind":"build",
+ "ref":"master",
+ "tag":false,
+ ...
+ }
+```
+
+A filter can use `object_kind` and `ref` attributes for example to execute the
+deploy action only on a `build` event on the `master` branch.
# Examples
+*(Note: the filter examples below are valid for GitLab)*
Execute pre-deploy script, don't `pull` the repository but execute a deploy
script, and finish with a post-deploy script. Execute only for `push` events on
@@ -60,7 +71,7 @@ the `master` branch.
"deploy": "echo deploying",
"filters": [
{
- "action": "push",
+ "object_kind": "push",
"ref": "refs/heads/master"
}
]
@@ -84,11 +95,38 @@ Clone repository on `push` to `master`.
"path": "~/repositories/hooktest",
"filters": [
{
- "action": "push",
+ "object_kind": "push",
"ref": "refs/heads/master"
}
]
}
]
}
+```
+
+Execute script upon GitLab CI successful build of `master` branch.
+
+```json
+{
+ "pidfilepath": "~/.gitautodeploy.pid",
+ "host": "0.0.0.0",
+ "port": 8080,
+ "global_deploy": [
+ "echo Pre-deploy script",
+ "echo Post-deploy script"
+ ],
+ "repositories": [
+ {
+ "url": "http://gitlab/playground/hooktest.git",
+ "deploy": "echo deploying project!",
+ "filters": [
+ {
+ "object_kind": "build",
+ "ref": "master",
+ "build_status": "success"
+ }
+ ]
+ }
+ ]
+}
``` \ No newline at end of file