'How to get the triggered time of gocd in gradle task?

In our gocd config: it calls gradle task. How to get the triggered time of gocd in gradle task?

As currently we get the pipeline number (1.6-102) from this: System.env.GO_PIPELINE_LABEL.

enter image description here

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source