cici 如果你是在ks-console 中通过点击 运行 触发的流水线,那么会在集群中创建一个 pipelinerun 资源,这个资源的annotations (devops.kubesphere.io/creator) 记录了发起者的名称。
e.g.
root@stonetest2:~# kubectl -n devcm59v get pipelineruns agent-location-g2p5j -o yaml
apiVersion: devops.kubesphere.io/v1alpha3
kind: PipelineRun
metadata:
annotations:
devops.kubesphere.io/creator: devops-proj-operator
devops.kubesphere.io/jenkins-pipelinerun-id: "12"