GO_TRIGGER_USER recorded as "changes" when pipeline is manually triggered through GoCD UI by admin

113 views
Skip to first unread message

André Neves

unread,
Apr 6, 2018, 6:25:05 AM4/6/18
to go-cd
Hi,

I've noticed today that the GO_TRIGGER_USER variable is being set to "changes" when I trigger a pipeline manually. I do see in the pipeline screen that pipeline was triggered by myself, my GoCD user but the variable value doesn't match this.
It should only be set to "changes" when it's triggered by a commit on a polled material correct?

I'm using version 18.1





Regards

André
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Varsha Varadarajan

unread,
Apr 6, 2018, 6:34:27 AM4/6/18
to go-cd
Hello,

The GO_TRIGGER_USER environment variable is based on who triggered a stage. On the dashboard, the trigger message `Triggered by admin` refers to who triggered the first stage. I am not sure which console log you've attached, whether its for the first or the second stage. If its for the second stage, which got automatically triggered upon completion of the first stage, then it is the expected behaviour. 

Thanks,
Varsha

André Neves

unread,
Apr 6, 2018, 6:54:14 AM4/6/18
to go-cd
Hi,

It was indeed for the 2nd stage which is according to your explanation. I now verified the 1st stage and it shows "admin".

We have a wrapper for the execution on the go-agent side which was relying on some verifications of who has triggered the pipeline but given this information I will have to see how to get around this. But this means that, given a manual execution of a fully automated pipeline, we don't know who exactly triggered the pipeline itself from the context of stages which are not the first one.

Thank you

André Neves

unread,
Apr 19, 2018, 4:14:27 AM4/19/18
to go-cd
Given the documentation around fan-in/fan-out and best practices, we've realized that we are better of in having the first stage of each pipeline to fetch the versions dependency and having the second stage automatic for non-production deployments and manual for production deployments. Having this stage manual we are able to fetch the GO_TRIGGER_USER which will contain the "proper value".
Reply all
Reply to author
Forward
0 new messages