Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #28 from keptn-contrib/feature/27/labels
Browse files Browse the repository at this point in the history
#27 Add labels to get-sli.done
  • Loading branch information
johannes-b authored Apr 28, 2020
2 parents d926bbe + e005443 commit 2e4d918
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func retrieveMetrics(event cloudevents.Event) error {
}

return sendInternalGetSLIDoneEvent(shkeptncontext, eventData.Project, eventData.Service, eventData.Stage,
sliResults, eventData.Start, eventData.End, eventData.TestStrategy, eventData.DeploymentStrategy)
sliResults, eventData.Start, eventData.End, eventData.TestStrategy, eventData.DeploymentStrategy, eventData.Labels)
}

// getCustomQueries returns custom queries as stored in configuration store
Expand Down Expand Up @@ -230,7 +230,7 @@ func generatePrometheusURL(pc *prometheusCredentials) string {
}

func sendInternalGetSLIDoneEvent(shkeptncontext string, project string,
service string, stage string, indicatorValues []*keptnevents.SLIResult, start string, end string, testStrategy string, deploymentStrategy string) error {
service string, stage string, indicatorValues []*keptnevents.SLIResult, start string, end string, testStrategy string, deploymentStrategy string, labels map[string]string) error {

source, _ := url.Parse("prometheus-sli-service")
contentType := "application/json"
Expand All @@ -244,6 +244,7 @@ func sendInternalGetSLIDoneEvent(shkeptncontext string, project string,
End: end,
TestStrategy: testStrategy,
DeploymentStrategy: deploymentStrategy,
Labels: labels,
}
event := cloudevents.Event{
Context: cloudevents.EventContextV02{
Expand Down

0 comments on commit 2e4d918

Please sign in to comment.