Thanks for you reply Jason. 1. The reason for considering an internal API URL is because I am hosting the GoCD server and Agents on the same server and the same docker network. Using an internal URL would mean the communication happens on the internal network. It is a nice to have feature but not a requirement. I could play with the docker container URLs and see if that works. I also thought this could help bypass the need for authentication if it is internal.
2. I thought that was the case. Trigger with options is a good idea. It does add a point of friction for the users when triggering the pipelines, but I will definitely consider it if I need to add that. Thanks a lot. Labib On Friday, 26 February 2021 at 09:14:39 UTC+13 [email protected] wrote: > Hi Labib, > > 1. I do not think so. I'm also not sure why you would want this. There are > probably some APIs that Agents interact with that end users do not but what > you're trying to accomplish is making the Agent call the end user APIs. Why > would you want/need a second URL for this? > > 2. I do not believe GoCD passes the user context on to the Agent when a > Job is started. The user's information is stored as a property on the > Pipeline instance so that we know who triggered it but I believe that is > the extent of it. The only way I can think of to pass user context to the > Agent would be to use Properties or Environment Variables and have the user > "Trigger with options" from the UI and manually set some values. > > Hope this helps, > Jason > > > On Wednesday, 24 February 2021 at 18:05:07 UTC-5 [email protected] > wrote: > >> Hey everyone, >> >> I am trying to create a pipeline that when triggered, it triggers certain >> stages in a set of pipelines. This is not something I can do using >> dependencies so I am using the GoCD API to do so. I have that all working >> and fine but a couple of questions: >> >> 1- Is there an internal URL for the API that can be accessed by the >> agents rather than using the public URL? >> >> 2- Since this is an internal request coming from a pipeline triggered >> manually by a user, is there a way to pass that authentication to the API? >> >> Thanks, >> Labib >> > -- 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/a7d24c18-8e7a-4105-9f9b-7236d7e8cd79n%40googlegroups.com.
