I have a docker container with git-sync k8s.gcr.io/git-sync/git-sync:v3.4.0
that has the following setup:
environment : [
{
name: "GIT_SYNC_BRANCH",
value: "master"
},
{
name: "GIT_SYNC_DEST",
value: "airflow"
},
{
name: "GIT_SYNC_ROOT",
value: "/tmp/git"
},
],
secrets : [
{
name : "GIT_SYNC_REPO",
valueFrom : "${aws_ssm_parameter.git_sync_repo.arn}"
},
{
name: "GIT_SYNC_WEBHOOK_URL",
valueFrom: "${aws_ssm_parameter.slack_webhook.arn}"
}
],
It works fine as I see how it pull the changes I push to master, but when trying to connect to the Slack Webhook
that I enabled it gets an error The purpose is to receive a notification in Slack
to know that everything is okei. The log is:
I0209 12:14:59.744990 12 webhook.go:71] "level"=0 "msg"="sending webhook" "hash"="c04e7f7a4d20aa8ad4535425568ce4147f641cfc" "url"="https://hooks.slack.com/services/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" "method"="POST" "timeout"=1000000000
E0209 12:14:59.824012 12 hook.go:136] "msg"="hook failed" "error"="received response code 400 expected 200"
I also tried adding the example call using curl that Slack provides to the setup:
{
name : "GIT_SYNC_EXECHOOK_COMMAND",
value: "curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Hello, World\"}' https://hooks.slack.com/services/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"
}
And the error is:
I0209 12:28:03.695470 13 exechook.go:68] "level"=0 "msg"="running exechook" "command"="curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World MIQUEL!"}' https://hooks.slack.com/services/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" "timeout"=30000000000
E0209 12:28:03.699593 13 hook.go:136] "msg"="hook failed" "error"="Run("curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Hello, World!\"}' https://hooks.slack.com/services/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" ): fork/exec curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/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: no such file or directory: { stdout: "", stderr: "" }"
Thanks