Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Add log message of Keptn context (#143) (#144)
Browse files Browse the repository at this point in the history
* #1464 Add log message with Keptn context
  • Loading branch information
agrimmer authored Mar 10, 2020
1 parent 3095d9a commit dcdd0e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/api/utils/apiServiceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"github.com/keptn/go-utils/pkg/api/models"
"io/ioutil"
"net/http"

"github.com/keptn/go-utils/pkg/api/models"
)

// APIService represents the interface for accessing the configuration service
Expand Down Expand Up @@ -52,6 +53,12 @@ func post(uri string, data []byte, api APIService) (*models.EventContext, *model
// failed to parse json
return nil, buildErrorResponse(err.Error() + "\n" + "-----DETAILS-----" + string(body))
}

if eventContext.KeptnContext != nil {
fmt.Println("ID of Keptn context: " + *eventContext.KeptnContext)
} else {
fmt.Println("ID of Keptn context is nil")
}
return &eventContext, nil
}

Expand Down

0 comments on commit dcdd0e0

Please sign in to comment.