diff --git a/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-commands.sh b/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-commands.sh index c356fdc387180..d3030c2ffa55c 100644 --- a/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-commands.sh +++ b/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-commands.sh @@ -28,3 +28,23 @@ if [[ -f "${SHARED_DIR}/claude-report-available" ]]; then else echo "No Claude report found. Skipping." fi + +# +# Send Slack notification to #team-ocp-edge-notifications +# (Prow reporter_config already sends to #lvms-release-coordination) +# +WEBHOOK_FILE="/var/run/slack-webhook/team-ocp-edge-notifications" +if [[ -f "${WEBHOOK_FILE}" ]] && [[ "${JOB_TYPE:-}" == "periodic" ]]; then + REPORT_URL="${GCSWEB_JOB_URL}/artifacts/lvms-ci-doctor/openshift-edge-tooling-lvms-ci-doctor/artifacts/report-lvm-operator-ci-doctor.html" + MESSAGE=":robot_face: *LVMS CI Doctor* report available.\n| <${REPORT_URL}|Report> | |" + PAYLOAD=$(jq -nc --arg text "${MESSAGE}" '{"text": $text}') + set +x + curl -sf --connect-timeout 10 --max-time 30 -X POST -H 'Content-type: application/json' \ + --data "${PAYLOAD}" \ + "$(cat "${WEBHOOK_FILE}")" \ + && echo "Slack notification sent to #team-ocp-edge-notifications." \ + || echo "Warning: Slack notification failed (non-fatal)." + set -x +else + echo "Skipping Slack notification (webhook not available or not a periodic job)." +fi diff --git a/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-ref.yaml b/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-ref.yaml index 5ce99a2ba2146..c190166b5e7fa 100644 --- a/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-ref.yaml +++ b/ci-operator/step-registry/openshift/edge-tooling/lvms-ci/post/openshift-edge-tooling-lvms-ci-post-ref.yaml @@ -6,6 +6,10 @@ ref: tag: latest best_effort: true commands: openshift-edge-tooling-lvms-ci-post-commands.sh + credentials: + - namespace: test-credentials + name: edge-tooling-ci-monitor-slack-webhook + mount_path: /var/run/slack-webhook resources: requests: cpu: 100m @@ -14,3 +18,4 @@ ref: documentation: |- Post step that downloads the LVMS CI Doctor HTML report from GCS artifacts and saves it with a summary suffix so Spyglass displays it as a tab. + Also sends a notification to the team-ocp-edge-notifications Slack channel.