Another question ;)
How im able to use the same webhook services for diferent request
Im try something like:
[ { "id": "atlas", "execute-command": "/scripts/myscript1.sh", "command-working-directory": "/tmp/", "trigger-rule": { "match": { "type": "value", "value": "secrect1", "parameter": { "source": "header", "name": "X-Gitlab-Token", } } } } ] [ { "id": "atlas2", "execute-command": "/scripts/myscript1.sh", "command-working-directory": "/tmp/", "trigger-rule": { "match": { "type": "value", "value": "secrect2", "parameter": { "source": "header", "name": "X-Gitlab-Token", } } } }
]
Im try in diferent ways but all the time i get:
[webhook] 2019/12/17 00:06:22 Started POST /hooks/atlas2 [webhook] 2019/12/17 00:06:22 Completed 404 Not Found in 30.368µs [webhook] 2019/12/17 00:06:28 Started POST /hooks/atlas [webhook] 2019/12/17 00:06:28 Completed 404 Not Found in 34.086µs
If i use only one all works fine:
[ { "id": "atlas", "execute-command": "/scripts/myscript1.sh", "command-working-directory": "/tmp/", "trigger-rule": { "match": { "type": "value", "value": "secrect1", "parameter": { "source": "header", "name": "X-Gitlab-Token", } } } } ] [webhook] 2019/12/17 00:02:37 Started POST /hooks/atlas [webhook] 2019/12/17 00:02:37 Completed 200 OK in 164.625µs
I think it's because of your configuration JSON format: instead of
[ {...1} ] [ {...2} ]
you should have
[ {...1}, {...2} ]
You could use a linter like jsonlint.com/?json= or prettier.io/ to check your configuration file.
Thanks....
Thats solve the issue..
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Another question ;)
How im able to use the same webhook services for diferent request
Im try something like:
[
{
"id": "atlas",
"execute-command": "/scripts/myscript1.sh",
"command-working-directory": "/tmp/",
"trigger-rule": {
"match": {
"type": "value",
"value": "secrect1",
"parameter": {
"source": "header",
"name": "X-Gitlab-Token",
}
}
}
}
]
[
{
"id": "atlas2",
"execute-command": "/scripts/myscript1.sh",
"command-working-directory": "/tmp/",
"trigger-rule": {
"match": {
"type": "value",
"value": "secrect2",
"parameter": {
"source": "header",
"name": "X-Gitlab-Token",
}
}
}
}
]
Im try in diferent ways but all the time i get:
[webhook] 2019/12/17 00:06:22 Started POST /hooks/atlas2
[webhook] 2019/12/17 00:06:22 Completed 404 Not Found in 30.368µs
[webhook] 2019/12/17 00:06:28 Started POST /hooks/atlas
[webhook] 2019/12/17 00:06:28 Completed 404 Not Found in 34.086µs
If i use only one all works fine:
[
{
"id": "atlas",
"execute-command": "/scripts/myscript1.sh",
"command-working-directory": "/tmp/",
"trigger-rule": {
"match": {
"type": "value",
"value": "secrect1",
"parameter": {
"source": "header",
"name": "X-Gitlab-Token",
}
}
}
}
]
[webhook] 2019/12/17 00:02:37 Started POST /hooks/atlas
[webhook] 2019/12/17 00:02:37 Completed 200 OK in 164.625µs
I think it's because of your configuration JSON format: instead of
you should have
You could use a linter like jsonlint.com/?json= or prettier.io/ to check your configuration file.
Thanks....
Thats solve the issue..