how to call back environment veriables,

13 views
Skip to first unread message

harish ahmad

unread,
Jul 27, 2021, 4:21:23 AM7/27/21
to go-cd
trying since last two days not able to print a env veriable, 

[go] Job Started: 2021-07-27 13:45:02 IST[go] Start to prepare auth/35/UAT/1/deploy_project_task on daas-harish [/var/lib/go-agent][go] Start to build auth/35/UAT/1/deploy_project_task on daas-harish [/var/lib/go-agent][go] Task: echo $REPOSITORY_URItook: 0.102s
$REPOSITORY_URI
[go] Task status: passed, took: 0.102s
[go] Current job status: passed[go] Start to create properties auth/35/UAT/1/deploy_project_task on daas-harish [/var/lib/go-agent][go] Start to upload auth/35/UAT/1/deploy_project_task on daas-harish [/var/lib/go-agent][go] Job completed auth/35/UAT/1/deploy_project_task on daas-harish [/var/lib/go-agent]
Cds.PNG
dfsg.PNG

Ashwanth Kumar

unread,
Jul 27, 2021, 5:25:54 AM7/27/21
to go...@googlegroups.com
Try the following

bash -c "echo $ENV_VARIABLE_NAME"

This works because GoCD doesn't run the command inside a shell by default. If you search the mailing list, you can find more history behind it. 

--
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/90cd7a32-2c62-429b-9f57-2bedac05619bn%40googlegroups.com.

harish ahmad

unread,
Jul 27, 2021, 6:41:17 AM7/27/21
to go-cd
thanks :)
Reply all
Reply to author
Forward
0 new messages