Skip to content

Instantly share code, notes, and snippets.

@adnanh
Created March 12, 2016 12:52
Show Gist options
  • Save adnanh/a014c53d1f1043cb188e to your computer and use it in GitHub Desktop.
Save adnanh/a014c53d1f1043cb188e to your computer and use it in GitHub Desktop.
Drew's Gitlab mirror
[
{
"id": "mirror-anarchy",
"execute-command": "/home/gitmirror/sync-anarchy.sh",
"command-working-directory": "/home/gitmirror",
"trigger-rule": {
"and": [
{
"match": {
"type": "payload-hash-sha1",
"secret": "YOUR-GITHUB-SECRET",
"parameter": { "source": "header", "name": "X-Hub-Signature" }
}
},
{
"match": {
"type": "value",
"value": "SOME-SECRET-TOKEN",
"parameter": { "source": "url", "name": "token" }
}
}
]
}
},
{
"id":"status-anarchy",
"execute-command":"/home/gitmirror/status-anarchy.sh",
"command-working-directory": "/home/gitmirror",
"pass-arguments-to-command": [
{"source": "payload", "name": "build_status"},
{"source": "payload", "name": "build_id"},
{"source": "payload", "name": "sha"},
{"source": "payload", "name": "build_name"}
],
"trigger-rule": {
"and": [
{
"match": {
"type": "payload-hash-sha1",
"secret": "YOUR-GITHUB-SECRET",
"parameter": { "source": "header", "name": "X-Hub-Signature" }
}
},
{
"match": {
"type": "value",
"value": "SOME-SECRET-TOKEN",
"parameter": { "source": "url", "name": "token" }
}
}
]
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment