mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
ci: fix OpenSearch link for e2e notifications (#2813)
* ci: fix OpenSearch link for e2e notifications
This commit is contained in:
parent
c61507f220
commit
b267457541
25
.github/actions/notify_e2e_failure/action.yml
vendored
25
.github/actions/notify_e2e_failure/action.yml
vendored
@ -39,14 +39,35 @@ runs:
|
||||
run: |
|
||||
# TODO(katexochen): add job number when possible
|
||||
jobURL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
|
||||
# OpenSearch instance details
|
||||
instance=search-e2e-logs-y46renozy42lcojbvrt3qq7csm
|
||||
region=eu-central-1
|
||||
|
||||
# UUID of index "logs-*"
|
||||
a="(metadata:(indexPattern:'9004ee20-77cc-11ee-b137-27c60b9ad4a4',view:discover))"
|
||||
|
||||
# Default window: last 7 days
|
||||
g='(time:(from:now-7d,to:now))'
|
||||
|
||||
# Query with filters for this workflow run
|
||||
# TODO(msanft): Add Self-managed param once logcollection is fixed.
|
||||
opensearchURL="https://search-e2e-logs-y46renozy42lcojbvrt3qq7csm.eu-central-1.es.amazonaws.com/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(columns:!(metadata.name,systemd.unit,kubernetes.pod_name,message),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-provider,negate:!f,params:(query:${{ inputs.provider }}),type:phrase),query:(match_phrase:(metadata.github.e2e-test-provider:${{ inputs.provider }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.run-id,negate:!f,params:(query:${{ github.run_id }}),type:phrase),query:(match_phrase:(metadata.github.run-id:${{ github.run_id }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.ref-stream.keyword,negate:!f,params:(query:'${{ inputs.refStream }}'),type:phrase),query:(match_phrase:(metadata.github.ref-stream.keyword:'${{ inputs.refStream }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.kubernetes-version.keyword,negate:!f,params:(query:'${{ inputs.kubernetesVersion }}'),type:phrase),query:(match_phrase:(metadata.github.kubernetes-version.keyword:'${{ inputs.kubernetesVersion }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-payload,negate:!f,params:(query:'${{ inputs.test }}'),type:phrase),query:(match_phrase:(metadata.github.e2e-test-payload:'${{ inputs.test }}')))),index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',interval:auto,query:(language:kuery,query:''),sort:!())"
|
||||
q=$(echo "(filters:!(
|
||||
(query:(match_phrase:(cloud.provider:${{ inputs.provider }}))),
|
||||
(query:(match_phrase:(metadata.github.run-id:${{ github.run_id }}))),
|
||||
(query:(match_phrase:(metadata.github.ref-stream:${{ inputs.refStream }}))),
|
||||
(query:(match_phrase:(metadata.github.kubernetes-version:${{ inputs.kubernetesVersion }}))),
|
||||
(query:(match_phrase:(metadata.github.e2e-test-payload:${{ inputs.test }})))
|
||||
))" | tr -d "\t\n ")
|
||||
|
||||
# URL construction
|
||||
opensearchURL="https://${instance}.${region}.es.amazonaws.com/_dashboards/app/data-explorer/discover/#?_a=${a}&_q=${q}&_g=${g}"
|
||||
cat << EOF > header.md
|
||||
|
||||
## Metadata
|
||||
|
||||
* [Job URL](${jobURL})
|
||||
* [OpenSearch URL](${opensearchURL// /%20})
|
||||
* [OpenSearch URL](${opensearchURL})
|
||||
|
||||
EOF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user