Skip to content

Commit

Permalink
Update the search URL to gradle-check-* (#505)
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi authored Sep 19, 2024
1 parent 2fea7ab commit 2f05fd8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gradlecheck/OpenSearchMetricsQuery.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ class OpenSearchMetricsQuery {
this.script = script
}

// Ensure the alias `gradle-check` is created targeting all the gradle-check-* indices.
def fetchMetrics(String query) {
def response = script.sh(
script: """
set -e
set +x
MONTH_YEAR=\$(date +"%m-%Y")
curl -s -XGET "${metricsUrl}/gradle-check/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.'
curl -s -XGET "${metricsUrl}/gradle-check-*/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.'
""",
returnStdout: true
).trim()
Expand Down

0 comments on commit 2f05fd8

Please sign in to comment.