[JIRA] (JENKINS-17116) gracefull job termination

2017-02-17 Thread robin.ja...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robin Jarry commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I have 2 patches that add support for killing launched processes with specific signals. I'll submit them in a PR asap. This is unfortunately a *NIX-only solution where signals are supported. For windows I don’t know what to do.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
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-17116) gracefull job termination

2017-02-17 Thread robin.ja...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robin Jarry assigned an issue to Robin Jarry  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-17116  
 
 
  gracefull job termination   
 

  
 
 
 
 

 
Change By: 
 Robin Jarry  
 
 
Assignee: 
 Robin Jarry  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
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-13466) Custom environment variables not available when build started by an SCM change

2012-04-16 Thread robin.ja...@gmail.com (JIRA)
Robin Jarry created JENKINS-13466:
-

 Summary: Custom environment variables not available when build 
started by an SCM change
 Key: JENKINS-13466
 URL: https://issues.jenkins-ci.org/browse/JENKINS-13466
 Project: Jenkins
  Issue Type: Bug
  Components: scm-sync-configuration
 Environment: not applicable
Reporter: Robin Jarry
Assignee: Frédéric Camblor
 Attachments: custom-env-master.jpg, custom-env-slave.jpg

Hi there,

I may have found a sneaky bug. Custom environment variables can be defined by 
the user into the general  nodes config:

!custom-env-master.jpg!

!custom-env-slave.jpg!

When a build is triggered by an SCM change, those variables are not available 
for SCM plugins. 

Let's say that I have a field in my SCM plugin configured with this value: 
*$\{JOB_NAME\}_$\{HOSTNAME}_$\{NODE_TYPE\}* If the build is triggered by an SCM 
change I get this error:

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
cleartool error: Illegal characters found in view name : ${NODE_TYPE}. An 
environment variable may have not been resolved.
Finished: FAILURE
{code}

Here is the code snipet from my plugin that does that:

{code:Java}
@Override
public boolean checkout(AbstractBuild build, Launcher launcher, FilePath 
workspace, 
BuildListener listener, File changelogFile) throws IOException, 
InterruptedException
{
try {  
logger.log(### Begin source code retrieval ###);

String resolvedViewName = 
build.getEnvironment(listener).expand(this.viewName);

Pattern pattern = Pattern.compile((\\$\\{.+?\\}));
Matcher matcher = pattern.matcher(resolvedViewName);
if (matcher.find()) {
String message = Illegal characters found in view name : %s.  +
An environment variable may have not been resolved.;
throw new ClearToolError(String.format(message, matcher.group()));
}
{code}

I removed *$\{NODE_TYPE\}* from my SCM configuration to let the build continue. 
And the user custom environment variables seem to be injected into the build 
environment after the SCM checkout. 

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
...
[ClearCase] === End source code retrieval ===
[polling_linux] $ /bin/sh -xe /tmp/hudson7589128551511062241.sh
+ env
...
NODE_TYPE=SLAVE
...
{code}

Could this be fixed? :)


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[JIRA] (JENKINS-13466) Custom environment variables not available when build started by an SCM change

2012-04-16 Thread robin.ja...@gmail.com (JIRA)

 [ 
https://issues.jenkins-ci.org/browse/JENKINS-13466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robin Jarry updated JENKINS-13466:
--

Description: 
Hi there,

I may have found a sneaky bug. Custom environment variables can be defined by 
the user into the general  nodes config:

!custom-env-master.jpg!

!custom-env-slave.jpg!

When a build is triggered by an SCM change, those variables are not available 
for SCM plugins. 

Let's say that I have a field in my SCM plugin configured with this value: 
*$\{JOB_NAME\}\_$\{HOSTNAME}\_$\{NODE_TYPE\}* If the build is triggered by an 
SCM change I get this error:

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
cleartool error: Illegal characters found in view name : ${NODE_TYPE}. An 
environment variable may have not been resolved.
Finished: FAILURE
{code}

Here is the code snipet from my plugin that does that:

{code:Java}
@Override
public boolean checkout(AbstractBuild build, Launcher launcher, FilePath 
workspace, 
BuildListener listener, File changelogFile) throws IOException, 
InterruptedException
{
try {  
logger.log(### Begin source code retrieval ###);

String resolvedViewName = 
build.getEnvironment(listener).expand(this.viewName);

Pattern pattern = Pattern.compile((\\$\\{.+?\\}));
Matcher matcher = pattern.matcher(resolvedViewName);
if (matcher.find()) {
String message = Illegal characters found in view name : %s.  +
An environment variable may have not been resolved.;
throw new ClearToolError(String.format(message, matcher.group()));
}
{code}

I removed *$\{NODE_TYPE\}* from my SCM configuration to let the build continue. 
And the user custom environment variables seem to be injected into the build 
environment after the SCM checkout. 

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
...
[ClearCase] === End source code retrieval ===
[polling_linux] $ /bin/sh -xe /tmp/hudson7589128551511062241.sh
+ env
...
NODE_TYPE=SLAVE
...
{code}

Could this be fixed? :)


  was:
Hi there,

I may have found a sneaky bug. Custom environment variables can be defined by 
the user into the general  nodes config:

!custom-env-master.jpg!

!custom-env-slave.jpg!

When a build is triggered by an SCM change, those variables are not available 
for SCM plugins. 

Let's say that I have a field in my SCM plugin configured with this value: 
*$\{JOB_NAME\}_$\{HOSTNAME}_$\{NODE_TYPE\}* If the build is triggered by an SCM 
change I get this error:

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
cleartool error: Illegal characters found in view name : ${NODE_TYPE}. An 
environment variable may have not been resolved.
Finished: FAILURE
{code}

Here is the code snipet from my plugin that does that:

{code:Java}
@Override
public boolean checkout(AbstractBuild build, Launcher launcher, FilePath 
workspace, 
BuildListener listener, File changelogFile) throws IOException, 
InterruptedException
{
try {  
logger.log(### Begin source code retrieval ###);

String resolvedViewName = 
build.getEnvironment(listener).expand(this.viewName);

Pattern pattern = Pattern.compile((\\$\\{.+?\\}));
Matcher matcher = pattern.matcher(resolvedViewName);
if (matcher.find()) {
String message = Illegal characters found in view name : %s.  +
An environment variable may have not been resolved.;
throw new ClearToolError(String.format(message, matcher.group()));
}
{code}

I removed *$\{NODE_TYPE\}* from my SCM configuration to let the build continue. 
And the user custom environment variables seem to be injected into the build 
environment after the SCM checkout. 

{code}
Started by an SCM change
Building remotely on vmo426
[ClearCase] ### Begin source code retrieval ###
...
[ClearCase] === End source code retrieval ===
[polling_linux] $ /bin/sh -xe /tmp/hudson7589128551511062241.sh
+ env
...
NODE_TYPE=SLAVE
...
{code}

Could this be fixed? :)



 Custom environment variables not available when build started by an SCM change
 --

 Key: JENKINS-13466
 URL: https://issues.jenkins-ci.org/browse/JENKINS-13466
 Project: Jenkins
  Issue Type: Bug
  Components: scm-sync-configuration
 Environment: not applicable
Reporter: Robin Jarry
Assignee: Frédéric Camblor
  Labels: envinronment-variables, polling
 Attachments: custom-env-master.jpg, custom-env-slave.jpg


 Hi there,
 I may have found a sneaky bug. Custom environment variables can be defined by