A more determinate way would be to use a dedicated userid to trigger the pipeline, then you could you find that userid in the stages.approved_by member of the pipeline instance.
- Craig On Thursday, November 4, 2021 at 7:11:39 PM UTC-5 Piyush wrote: > Hi, > > We have one requirement where in we need to trigger the gocd pipelines > remotely. I have gone through the gocd apis and i have found sufficient > info on "how to trigger the pipeline" > > However, i need to know one critical piece of iinformation > > 1. Once the build pipeline is scheduled - how do i get the build number > (as we say in jenkins world) or instance number. I mean we can alway go > through pipeline history api (find the latest pipeline instance ---> > trigger the build remotely ---> find the latest pipeline instance.. and you > have your pipeline instance) > However, this approach will not work in the case where some one has > triggered manual builds as well. In that case both the builds (remotely > triggered and manual triggered) builds will be scheduled and i do not know > how to get the pipeline instance corresponding to the remote build. > > Any suggestions or help? > > PS:- i was thinking to check the timestamp and compare but thats a > workaround . > > Thanks > Piyush > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/d7cb311a-365c-4f82-9559-52ee9da59225n%40googlegroups.com.
