[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber updated JENKINS-57501 Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Martin Weber Status: Fixed but Unreleased Closed Resolution: Fixed Not A Defect Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.9463.1558549800283%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Comment: After careful studying of this discussion, as well as a web-page of snippet generator, it became clear for me that envVars, passed to cmakeBuild, has nothing to do with my issue.And the issue itself is invalid, since I've incorrectly passed arguments to cmake.Closing.Thanks for the help. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8355.1558514040495%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated JENKINS-57501 After careful studying of this discussion, as well as a web-page of snippet generator, it became clear for me that envVars, passed to cmakeBuild, has nothing to do with my issue. And the issue itself is invalid, since I've incorrectly passed arguments to withEnv. Thanks for the help. Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Status: Open Fixed but Unreleased Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline After careful studying of this discussion, as well as a web-page of snippet generator, it became clear for me that envVars, passed to cmakeBuild, has nothing to do with my issue.And the issue itself is invalid, since I've incorrectly passed arguments to cmake.Closing. Thanks for the help. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8351.1558513980218%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline After careful studying of this discussion, as well as a web-page of snippet generator, it became clear for me that envVars, passed to cmakeBuild, has nothing to do with my issue. And the issue itself is invalid, since I've incorrectly passed arguments to cmake. Closing. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8349.1558513980196%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote} Anyway, you do not need to pass envvars to BuildToolStep to configure *cmake*. These varaibles are passed to the *build tool* (make or nija).{quote}Now I see why my attempts failed. It seems, the only way to pass environment variables to cmake is using withEnv.{quote} The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how I should use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this. It generates a string in the form "NAME=VALUENAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either.I've also studied sources on GitHub but failed to find how `BuildToolStep` processes `this.vars`, set in `setEnvVars`. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8329.1558512900365%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote}The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how I should use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this (variable names and values differ) . It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either.I've also studied sources on GitHub but failed to find how `BuildToolStep` processes `this.vars`, set in `setEnvVars`. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8324.1558512660101%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote}The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how should I should use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this (variable names and values differ). It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either.I've also studied sources on GitHub but failed to find how `BuildToolStep` processes `this.vars`, set in `setEnvVars`. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8321.1558512601562%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote}The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how should I use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this (variable names and values differ). It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either. I've also studied sources on GitHub but failed to find how `BuildToolStep` processes `this.vars`, set in `setEnvVars`. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8318.1558512300122%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote}The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how should I use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this (variable names and values differ). It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8315.1558511280115%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline {quote}The online help for _Build tool | Env. Variables_*has* an example that shows how to set multiple variables.{quote}Sorry, I cannot figure out where it is, and how should I use it in a pipeline script.Here is what I've entered in pipeline snippet generator: !image-2019-05-22-10-36-53-131.png!And here is the generated code:{code:java}cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=BC=D''', withCmake: true]]{code}Code sample in the issue description does exactly this (variable names and values differ). It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. I've found two links: [https://javadoc.jenkins.io/plugin/cmakebuilder/index.html?hudson/plugins/cmake/BuildToolStep.html] and [https://javadoc.jenkins.io/plugin/cmakebuilder/hudson/plugins/cmake/BuildToolStep.html]They don't contain examples either. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8312.1558511040209%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline The online help for Build tool | Env. Variableshas an example that shows how to set multiple variables. Sorry, I cannot figure out where it is, and how should I use it in a pipeline script. Here is what I've entered in pipeline snippet generator: And here is the generated code: cmakeBuild buildDir: '${build_dir}', buildType: '${config}', cleanBuild: true, generator: 'Ninja', installation: 'InSearchPath', sourceDir: '${env.WORKSPACE}', steps: [[envVars: '''A=B C=D''', withCmake: true]] Code sample in the issue description does exactly this (variable names and values differ). It generates a string in the form "NAME=VALUE NAME=VALUE"), and CMake does not see these variables. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8304.1558510920382%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Attachment: image-2019-05-22-10-36-53-131.png Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.8298.1558510620200%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline "java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList" You get this, because BuildToolStep.setEnvVars() takes a String, not an array. You may specify more than one envvar, if you separate them by newlines (as stated in the online help). This is the same behavior as in the freestyle project version of the plugin. Anyway, you do not need to pass envvars to BuildToolStep to configure cmake. These varaibles are passed to the build tool (make or nija). The main purpose is to run make install with the DESTDIR variable set to a directory below workspace root in order to ease archiving of artifacts. 4. Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they only show how to set a single variable, a very rare case, IMHO. The online help for Build tool | Env. Variables has an example that shows how to set multiple variables. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv" (Though, I understand that different authors could have different ideas about user interface. But consistency is good).3. Description of envVars is misleading. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string. It is not said, how these pairs must be separated, if they are wrapped in a string.4. Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they only show just one how to set a single variable, a very rare case, IMHO . Add Comment This message was sent by Atlassian Jira
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv" (Though, I understand that different authors could have different ideas about user interface . But consistency is good ).3. Description of envVars is misleading too . I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string. It is not said, how these pairs must be separated. 4. Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they show just one. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv" (Though, I understand that different authors could have different ideas about user interface. But consistency is good).3. Description of envVars is misleading. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string. It is not said, how these pairs must be separated , if they are wrapped in a string .4. Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they show just one. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv" (Though, I understand that different authors could have different ideas about user interface) . 3. Description of envVars is misleading too. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string.Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they show just one. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv" (Though, I understand that different authors could have different ideas about user interface).3. Description of envVars is misleading too. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string. 4. Both documentation pieces, for withEnv and for envVars, miss examples on how to set multiple variables, they show just one. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev edited a comment on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to {code:java}vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ","LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...","LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;","PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc]{code}does the trick.Tried adding the same to the "steps" argument of cmakeBuild:{code:java}def steps = [[withCmake: true, envVars: [ " INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc] ]]{code}got error:{code:java}"java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList"{code} I see following issues.1. Manual of withEnv is not clear (I understand that this is not related to current issue)2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv". Description is misleading too. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string.Both documentation pieces, for withEnv and envVars, miss examples on how to set multiple variables, they show just one. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, indeed. Changing argument of withEnv to vars = ["INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc ] does the trick. Tried adding the same to the "steps" argument of cmakeBuild: def steps = [[ withCmake: true, envVars: [INCLUDE=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE; . ", "LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64; ...", "LIBPATH=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;", "PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;...", // etc ] ]] got error: "java.lang.ClassCastException: class hudson.plugins.cmake.BuildToolStep.setEnvVars() expects class java.lang.String but received class java.util.ArrayList" I see following issues. 1. Manual of withEnv is not clear (I understand that this is not related to current issue) 2. Processing of envVars by cmakeBuild is not consistent with one, done by "withEnv". Description is misleading too. I've come from Python, and sentence "key-value pairs" suggests that this argument should be a dictionary (or a map), not a string. Both documentation pieces, for withEnv and envVars, miss examples on how to set multiple variables, they show just one. Add Comment
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline withEnv takes an array of multiple key-value pairs, one for each variable. Your script passes an array of a single string containing multiple key-value pairs, if I understand your script correctly. Please try with a minimal example. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.5699.1558380660359%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev ipeline Jenkins pipeline snippet : {code:java}def cmake_tasks() {def tasks=[:] def steps = [[withCmake: true]]def os = "windows" def config = "Debug" def generator = "Ninja"// addidional env vars def vars="""LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0um\\x64;PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\binamd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64;C:\\Program Files (x86)\\Windows Kits\\10\\binx64;C:\\Program Files (x86)\\Windows Kits\\10\\binx86;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C:\\ Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v7.0bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v7.0libnvvp;g:\\Bin;"""// another variant, also does not affect CMake// vars = bat returnStdout: true, script: """//@call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64//set//"""// third variant, also doesn't work//bat """call c:\Path\to\Visual\Studio\vcvarsall.bat // set > build.props"""//var = readFile("build.props") def cmakeArgs = "-DARG=VALUE" def cmake_inst = 'InSearchPath' steps.add([envVars: vars]) cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Bin\\ninja" tasks["${os}"] = { node("${os}"){ stage("${os}/${config}") { withEnv([vars]){ if (os == "windows"){ bat "set | sort" println vars println steps } cmakeBuild(buildDir: "build_${config}", buildType: config, cleanBuild: true, cmakeArgs: cmakeArgs, generator: generator, installation: cmake_inst, sourceDir: ".", steps: steps) } } } } return tasks} pipeline {agent none stages{ stage('Configurte') { steps{ script { parallel cmake_tasks() }} } }} {code} Snippet of
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev ipeline snippet {code:java}def cmake_tasks() {def tasks=[:] def steps = [[withCmake: true]]def os = "windows" def config = "Debug" def generator = "Ninja"// addidional env vars def vars="""LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0um\\x64;PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\binamd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64;C:\\Program Files (x86)\\Windows Kits\\10\\binx64;C:\\Program Files (x86)\\Windows Kits\\10\\binx86;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C:\\ Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v7.0bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v7.0libnvvp;g:\\Bin;"""// another variant, also does not affect CMake// vars = bat returnStdout: true, script: """//@call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64//set//""" // third variant, also doesn't work//bat """call c:\Path\to\Visual\Studio\vcvarsall.bat // set > build.props"""//var = readFile("build.props") def cmakeArgs = "-DARG=VALUE" def cmake_inst = 'InSearchPath' steps.add([envVars: vars]) cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Bin\\ninja" tasks["${os}"] = { node("${os}"){ stage("${os}/${config}") { withEnv([vars]){ if (os == "windows"){ bat "set | sort" println vars println steps } cmakeBuild(buildDir: "build_${config}", buildType: config, cleanBuild: true, cmakeArgs: cmakeArgs, generator: generator, installation: cmake_inst, sourceDir: ".", steps: steps) } } } } return tasks} pipeline {agent none stages{ stage('Configurte') { steps{ script { parallel cmake_tasks() }} } }} {code} Snippet of CMakeLists.txt{code:java}cmake_minimum_required(VERSION
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Actually, that code was in the original snippet, but it was corrupted by Jira. I've learned about the code tag and fixed original issue. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.5159.1558339260171%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Pipeline ipeline snippet { { code:java} def cmake_tasks() { }} {{ def tasks=[:] }} {{ def steps = [[withCmake: true]] }}{{ def os = "windows" }} {{ def config = "Debug" }} {{ def generator = "Ninja" }} {{ // addidional env vars def vars=""" }} {{ LIB=C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C: \\ Program Files (x86) \\ Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C: \\ Program Files (x86) \\ Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C: \\ Program Files (x86) \\ Windows Kits\\10\\lib\\10.0.17763. 0 0um \\ um x64; }} {{ PATH=C: \\ Program Files (x86)\\MSBuild\\14.0\\ bin\\amd64 binamd64 ;C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64 \\ ;C: \\ Program Files (x86) }} {{ \\ Windows Kits\\10\\ bin\\x64 binx64 ;C: }}{{ \\ Program Files (x86) }}{{ \\ Windows Kits\\10\\ bin\\x86 binx86 ;C: }}{{ \\ Program Files (x86) }}{{ \\ Microsoft SDKs\\Windows\\v10.0A\\bin }}{{ \\ NETFX 4.6.1 Tools\\x64 }}{{ ;C: }} {{ \\ Program Files (x86) }}{{ \\ Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C: }} \\ {{ Program Files }} {{ \\ NVIDIA GPU Computing Toolkit\\CUDA\\v7. 0\\bin 0bin ;C: }}{{ \\ Program Files }}{{ \\ NVIDIA GPU Computing Toolkit\\CUDA\\v7. 0\\libnvvp 0libnvvp ;g: }}{{ \\ Bin; }} """// another variant, also does not affect CMake// vars = bat returnStdout: true, script: """//@call "C: \ {{ Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat " amd64//set// "" }} " {{ def cmakeArgs = "-DARG=VALUE" }} {{ def cmake_inst = 'InSearchPath' }}{{ steps.add([envVars: vars]) }} {{ cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Bin }}{{ \\ ninja" }} {{ tasks["${os}"] = { }} {{ node("${os}"){ }} {{ stage("${os}/${config}") { }} {{ withEnv([vars]){ }} {{ if (os == "windows") }} { \{{}} bat "set | sort" println vars println steps {\{ } }} {\{ cmakeBuild(buildDir: "build_${config}", }} \{{ buildType: config, }} \{{ cleanBuild: true, }} \{{ cmakeArgs: cmakeArgs, }} \{{ generator: generator, }} \{{ installation: cmake_inst, }} \{{ sourceDir: ".", }} {{
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Pipeline snippet{{def cmake_tasks() {}}{{ def tasks=[:]}}{{ def steps = [[withCmake: true]]}}{{def os = "windows"}}{{ def config = "Debug"}}{{ def generator = "Ninja"}} {{ def vars="""}}{{ LIB=C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C: \\ Program Files (x86) \\ Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C: \\ Program Files (x86) \\ Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C: \\ Program Files (x86) \\ Windows Kits\\10\\lib\\10.0.17763.0\\um \\ x64;}}{{ PATH=C: \\ Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\;C: \\ Program Files (x86)}}{{Windows Kits\\10\\bin\\x64;C: \\ }}{{ Program Files (x86) \\ }}{{ Windows Kits\\10\\bin\\x86;C: \\ }}{{ Program Files (x86) \\ }}{{ Microsoft SDKs\\Windows\\v10.0A\\bin \\ }}{{ NETFX 4.6.1 Tools\\x64 \\ }}{{ ;C:}}{{Program Files (x86) \\ }}{{ Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C: \\ }}{{ Program Files}}{{NVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\bin;C: \\ }}{{ Program Files \\ }}{{ NVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\libnvvp;g: \\ }}{{ Bin;}} \ {{ """}}{{ def cmakeArgs = "-DARG=VALUE"}}{{ def cmake_inst = 'InSearchPath'}}{{steps.add([envVars: vars])}}{{ cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Bin \\ }}{{ ninja"}}{{ tasks["${os}"] = {}}{{ node("${os}"){}}{{ stage("${os}/${config}") {}}{{ withEnv([vars]){}}{{ if (os == "windows")}}{ \ {{}} bat "set | sort" println vars println steps{ \ { }}}{ \ { cmakeBuild(buildDir: "build_${config}", }} \ {{ buildType: config, }} \ {{ cleanBuild: true, }} \ {{ cmakeArgs: cmakeArgs, }} \ {{ generator: generator, }} \ {{ installation: cmake_inst, }} \ {{ sourceDir: ".", }}{{ steps: steps)}}{{ }}}{{ }}} \ {{ }}}{{ }}}{{ return tasks}} \ {{ }}} {{pipeline {}}{{ agent none}}{{ stages{}}{{ stage('Configurte') {}}{{ steps}}{ \ {{}}{{ script {}}{ \ { parallel cmake_tasks() }}{ \ { }}}{ \ { }}} \ {{ }}}{{ }}} \ {{ }}}Snippet of CMakeLists.txt
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Could you provide a minimal example pipeline that reproduces the issue? In your script above, I canot find any place where envvars for cmake are set. The following verifies that indeed envvars are passed to cmake: node { stage('Checkout') { git 'https://github.com/15knots/cmake4eclipse-sample-projects.git' } stage('withEnv') { withEnv(['CC=TOOL_NOT_INSTALLED', 'CXX=TOOL_NOT_INSTALLED++']) { sh 'env|sort' // this will of course make cmake fail since CC=TOOL_NOT_INSTALLED isnt there cmakeBuild buildDir: 'build', buildType: 'Debug', installation: 'InSearchPath', sourceDir: 'C-flat', cleanBuild: true, steps: [[args: 'all', envVars: 'DESTDIR=balh/Blah']] } } } Note that the environment directive here does not have any effect: stage('environment') { environment { // this does not have any effect CC = TOOL_NOT_INSTALLED CXX = TOOL_NOT_INSTALLED++ } // neither CC nor CXX are reported by env sh 'env|sort' } Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Concerning the workaroung, see JENKINS-29142: look for MSVC 15.x toolchain. Feel free to re-open and submit a pull request. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.4689.1558129560489%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Also, it would be good to handle call of "vcvarsall.bat" inside cmakeBuild. Currently I've made a workaround: bat """ call c:\Path\to\Visual\Studio\vcvarsall.bat set > build.props """ var = readFile("build.props") ... cmakeBuild steps: [envVars : vars] Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.581.1558081440092%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev updated an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Change By: Vladimir Eremeev Pipeline snippet{{def cmake_tasks() { }} {{ def tasks=[:] }} {{ def steps = [[withCmake: true]] }}{{ def os = "windows" }} {{ def config = "Debug" }} {{ def generator = "Ninja" }}{{ def vars=""" }} {{ LIB=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\um\\x64; }} {{ PATH=C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\;C:\\Program Files (x86) \\ }}{{ Windows Kits\\10\\bin\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\x64\\;C: \\ }}{{ Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C:\\Program Files \\ }}{{ NVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\libnvvp;g:\\Bin; }} {{ """ }} {{ def cmakeArgs = "-DARG=VALUE" }} {{ def cmake_inst = 'InSearchPath' }}{{ steps.add([envVars: vars]) }} {{ cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Bin\\ninja" }} {{ tasks["${os}"] = { }} {{ node("${os}"){ }} {{ stage("${os}/ Debug ${config} ") { }} {{ withEnv([vars]){ }} {{ if (os == "windows") }} { {{}} bat "set | sort" println vars println steps {{ } }} {{ cmakeBuild(buildDir: "build_${config}",}}{{ buildType: config,}}{{ cleanBuild: true,}}{{ cmakeArgs: cmakeArgs,}}{{ generator: generator,}}{{ installation: cmake_inst,}}{{ sourceDir: ".",}}{{ steps: steps) }} {{ } }} {{ } }} {{ } }} {{
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Yes, this duplicates JENKINS-51060 with addition of ignorance of "envVars" in steps. According to last comment in that issue, added 2 months after it was closed, the bug was not fixed. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.553.1558077060129%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Martin Weber commented on JENKINS-57501 Re: cmakeBuild does not set environment variables in Windows when run in Pipeline Possibly a duplicate of JENKINS-51060? But that should have been fixed. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199364.155799447.321.1558036800158%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57501) cmakeBuild does not set environment variables in Windows when run in Pipeline
Title: Message Title Vladimir Eremeev created an issue Jenkins / JENKINS-57501 cmakeBuild does not set environment variables in Windows when run in Pipeline Issue Type: Bug Assignee: Martin Weber Components: cmakebuilder-plugin Created: 2019-05-16 08:14 Environment: Jenkins ver. 2.164.3 Cmake plugin version 2.6.1 Jenkins slave running on windows machine as a service. Priority: Blocker Reporter: Vladimir Eremeev Pipeline snippet {{def cmake_tasks() { def tasks=[:] def steps = [[withCmake: true]] def os = "windows" def config = "Debug" def generator = "Ninja" def vars=""" LIB=C:Program Files (x86)Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:Program Files (x86)Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C:Program Files (x86)Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C:Program Files (x86)Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:Program Files (x86)Windows Kits\\10\\lib\\10.0.17763.0\\umx64; PATH=C:Program Files (x86)\\MSBuild\\14.0\\bin\\amd64;C:Program Files (x86)Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\;C:Program Files (x86)Windows Kits\\10\\bin\\x64;C:Program Files (x86)Windows Kits\\10\\bin\\x86;C:Program Files (x86)Microsoft SDKs\\Windows\\v10.0A\\binNETFX 4.6.1 Tools\\x64\\;C:Program Files (x86)Common Files\\Oracle\\Java\\javapath;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\CMake\\bin;c:\\windows\\system32;C:Program FilesNVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\bin;C:Program FilesNVIDIA GPU Computing Toolkit\\CUDA\\v7.0\\libnvvp;g:Bin; """ def cmakeArgs = "-DARG=VALUE" def cmake_inst = 'InSearchPath' steps.add([envVars: vars]) cmakeArgs = cmakeArgs + " -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_MAKE_PROGRAM=g:\\Binninja"