How to pass modified files to gocd pipeline

17 views
Skip to first unread message

Beatrice Hammond

unread,
Dec 6, 2021, 5:31:39 AM12/6/21
to go-cd
Hi GOCD

I have a pipeline which for one of the steps requires a list of the modified files in the commit that triggered the files to be passed into it. 

Is there a way of accessing this information, perhaps as an environment variable and passing it to the pipeline. I can see GOCD has access to this information but am unsure how to configure the pipeline to make use of it.

Thank You in advance 
Kind regards,
Beatrice

Ashwanth Kumar

unread,
Dec 6, 2021, 5:42:51 AM12/6/21
to go...@googlegroups.com
GoCD doesn't give this information out of the box, but you can probably use this answer (https://stackoverflow.com/a/55665550/11474419) to get that yourself. 

You can get the commit id(s) via environment variable(s) for the required material that's configured in the pipeline.

Thanks,


--
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 go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/0fc9e206-8fac-48d4-8cd9-6e24e12338d1n%40googlegroups.com.


--

Ashwanth Kumar / ashwanthkumar.in

Aravind SV

unread,
Dec 6, 2021, 10:17:37 AM12/6/21
to 'Beatrice Hammond' via go-cd

Hello Beatrice,

The GO_FROM_REVISION and GO_TO_REVISION environment variables (along with their variations when you have multiple materials) described in the documentation can be used for this.

An older thread from this mailing list might be useful: https://groups.google.com/g/go-cd/c/eI5W6fUCwTI/m/hyIX3VQkFsYJ

Regards,
Aravind

Reply all
Reply to author
Forward
0 new messages