Thanks  Jerome. It worked perfectly.

On Wednesday, 3 February 2021 at 00:54:04 UTC+8 Jérôme Godbout wrote:

> Can you use 
>
> withEnv([“GOOL =${params.GOOL”}]) {
>
>    sh(…);
>
> }
>
>  
>
> *Jérôme Godbout*
> Software / Firmware Lead
>
> *C:* (581) 777-0050 
> *O:* (418) 800-1073 ext.: 109  
> [email protected] 
>
> *dimonoff.com* <https://www.dimonoff.com/>   |    *amotus.ca* 
> <https://www.amotus-solutions.com/>
>
>  
>
> *From:* [email protected] <[email protected]> *On 
> Behalf Of *Elango Thiagarajan
> *Sent:* February 2, 2021 10:23 AM
> *To:* Jenkins Users <[email protected]>
> *Subject:* Environment variable - shell
>
>  
>
> Hi folks,
>
>  
>
> I am very new to Jenkins. Kindly help me through.
>
>  
>
> I have few parameters declared in my pipeline script and i need to pass 
> that to environment  variables. 
>
>  
>
> i tried like below
>
>  
>
> sh """
>
>      export GOOL=${params.GOOL}
>
>  
>
> but while execution is throwing bad substitution exception. Any pointers 
> on what wrong here
>
>  
>
>  
>
> The exported enviornmnet variable will be used as input to run a docker 
> image.
>
> -- 
>
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" 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/jenkinsci-users/82ce9f00-434d-4a99-8e70-0233fecde1f6n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/82ce9f00-434d-4a99-8e70-0233fecde1f6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 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/jenkinsci-users/97bcb7dc-52f5-44a7-af2d-f07c7f6d10b0n%40googlegroups.com.

Reply via email to