diff --git a/infra/scripts/train.sh b/infra/scripts/train.sh index ad08081e8..6a1e704a3 100755 --- a/infra/scripts/train.sh +++ b/infra/scripts/train.sh @@ -172,10 +172,10 @@ find_ci_workflow() { local sha="$1" local short_sha="${sha:0:8}" # List recent ci-pipeline workflows and find the one matching our commit. - # Argo labels the workflow with the template name; we also grep for the SHA - # in the workflow spec parameters. + # Argo Events labels workflows with events.argoproj.io/trigger (not + # workflows.argoproj.io/workflow-template), so use that selector. kubectl -n "${NAMESPACE}" get workflows \ - -l "workflows.argoproj.io/workflow-template=ci-pipeline" \ + -l "events.argoproj.io/trigger=ci-pipeline" \ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.phase}{"\t"}{range .spec.arguments.parameters[*]}{.name}={.value}{","}{end}{"\n"}{end}' \ 2>/dev/null \ | grep "commit-sha=${sha}\|commit-sha=${short_sha}" \