Execute pre/post rollout webhooks

- halt the canary advancement if pre-rollout hooks are failing
- include the canary status (Succeeded/Failed) in the post-rollout webhook payload
- ignore post-rollout webhook failures
- log pre/post rollout webhook response result
This commit is contained in:
stefanprodan
2019-04-13 15:43:23 +03:00
parent e0fc5ecb39
commit edcff9cd15
3 changed files with 54 additions and 8 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ func TestCallWebhook(t *testing.T) {
Metadata: &map[string]string{"key1": "val1"},
}
err := CallWebhook("podinfo", "default", hook)
err := CallWebhook("podinfo", "default", flaggerv1.CanaryProgressing, hook)
if err != nil {
t.Fatal(err.Error())
}
@@ -35,7 +35,7 @@ func TestCallWebhook_StatusCode(t *testing.T) {
URL: ts.URL,
}
err := CallWebhook("podinfo", "default", hook)
err := CallWebhook("podinfo", "default", flaggerv1.CanaryProgressing, hook)
if err == nil {
t.Errorf("Got no error wanted %v", http.StatusInternalServerError)
}