[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-11-06 Thread ma...@piwo.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Marek Adamczyk commented on  JENKINS-54369  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
 Try to change the way, in which you are writting variables to file into following: "name=variable" | Out-File env.properties -Encoding ascii  -append It helped for me.  
 

  
 
 
 
 

 
 
 

 
 
 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.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Change By: 
 Robson Hermes  
 

  
 
 
 
 

 
 I am having a problem with the envInject, cause it seems to be writing NUL (Unicode  char) from the env of a Windows slave. 1 - Basically I am creating a new job which runs in a Windows slave. This job executes a powershell code that writes variables to a file env.properties (attachment 01.png). I am doing that cause these values are used later in other job steps.2 - The file is written without any problems in the windows slave (attachment 02.png)3 - When I try to run the job the next time, I have the error: {code:java}java.lang.IllegalArgumentException: Invalid environment variable name: "CURRENT_ARCHIVE" at java.lang.ProcessEnvironment.validateName(Unknown Source) at java.lang.ProcessEnvironment.put(Unknown Source) at java.lang.ProcessEnvironment.put(Unknown Source) at hudson.Proc$LocalProc.environment(Proc.java:234) at hudson.Proc$LocalProc.(Proc.java:219){code} 4 - As you can see, apparently the name of the variable is fine. However, if I open the injectedEnvVars.txt in our Linux master, between each char, envinject added a u char, which causes the method ProcessEnvironment.validateName to throw an exception. (see attachments 03 and 04)  All other variables are fine. Just the ones I wrote are messed up.   Result is that I can run the job only first time. Any subsequent attempt fails, that's why I classified as major. Sorry if this interpretation is incorrect.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
  

[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Change By: 
 Robson Hermes  
 
 
Attachment: 
 03.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.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Change By: 
 Robson Hermes  
 
 
Attachment: 
 03.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.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Change By: 
 Robson Hermes  
 
 
Attachment: 
 02.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.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Change By: 
 Robson Hermes  
 
 
Attachment: 
 02.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.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54369) Env-inject writing \u0000 in injectedEnvVars.txt from windows slave

2018-10-31 Thread robsonher...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robson Hermes created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54369  
 
 
  Env-inject writing \u in injectedEnvVars.txt from windows slave   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Attachments: 
 01.png, 02.png, 03.png, 04.png  
 
 
Components: 
 envinject-plugin  
 
 
Created: 
 2018-10-31 14:11  
 
 
Environment: 
 jenkins master:  Debian 8  Jenkins ver. 2.110  envinject 2.1.3   jenkins slave:  Windows Server 2016  
 
 
Labels: 
 plugin environment  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Robson Hermes  
 

  
 
 
 
 

 
 I am having a problem with the envInject, cause it seems to be writing NUL (Unicode  char) from the env of a Windows slave.   1 - Basically I am creating a new job which runs in a Windows slave. This job executes a powershell code that writes variables to a file env.properties (attachment 01.png). I am doing that cause these values are used later in other job steps. 2 - The file is written without any problems in the windows slave (attachment 02.png) 3 - When I try to run the job the next time, I have the error:   

 

java.lang.IllegalArgumentException: Invalid environment variable name: "CURRENT_ARCHIVE"
	at java.lang.ProcessEnvironment.validateName(Unknown Source)
	at java.lang.ProcessEnvironment.put(Unknown Source)
	at