How to inject an env variable from declarative script?

15 views
Skip to first unread message

David Aldrich

unread,
Apr 23, 2018, 7:16:04 AM4/23/18
to jenkins...@googlegroups.com

Hi

 

I’m trying to fix the occasional MSBuild error:

 

"Fatal error C1090: PDB API call failed, error code '23'”

 

1.      The advice given in JENKINS-9104 is to inject the following environment variable using EnvInject:

 

_MSPDBSRV_ENDPOINT_=$BUILD_TAG

 

I don’t really understand the difference between defining and injecting an environment variable.  I want to specify this setting directly in a declarative script.  I could do:

 

stage('build_VisualStudio') {

        agent { label "jenkinswin10" }

        environment { _MSPDBSRV_ENDPOINT_=$BUILD_TAG }

etc.

 

Would that be sufficient or must env variable injection be done in a different way?

 

Best regards

 

David

 

Reply all
Reply to author
Forward
0 new messages