Thanks a lot Yves. I also saw this in some samples. But, I have a Shared
Library step, written to read a Yaml file from URL and return a Yaml
Object. However, it is not returning the Yaml object when I call the step,
although it is not throwing any error.

Regards,
Venkatesh


On Wed, Dec 9, 2020 at 1:07 AM Yves Schumann <[email protected]>
wrote:

> Hi Ven
>
> Am 08.12.2020 um 18:56 schrieb Ven H:
> > Can we have script block or credential block to perform some logic
> > inside the environment stage in Jenkinsfile?
>
> I'm doing such things without issues. Some examples:
>
> GIT_COMMIT_SHORT = sh(
>         script: "printf \$(git rev-parse --short ${GIT_COMMIT})",
>         returnStdout: true
> )
> CURRENT_DATE = sh(
>         script: "printf \"\$(date '+%F %T')\"",
>         returnStdout: true
> )
>
> Kind regards,
> Yves
>
> --
> 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/0afaf8c1-57b9-a329-eac4-5f9510a77897%40wayland
> .
>

-- 
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/CAPp28ereZ0RnVCv0eOABJDC-uySJJE1QJF96cVSo5qB8QnTLAg%40mail.gmail.com.

Reply via email to