After further investigation, here is a summary of my analysis (Please feel free to comment)

Symptom

CVS Polling fails due to missing private Key, even though the CVS checkout/update as part of a manually triggered build works fine. The path to private key (as part of SCM polling) contains the unexpanded $HOME variable, as indicated in the log.

Cause

I think the issue is caused by the following line of code in AbstractCvs.java (Line 509)

AbstractCvs.java
final EnvVars envVars = project.getLastBuild().getEnvironment(listener);

As the envVars now doesnt seem to contains HOME variable.

Note: While doing the CVS update/checkout, the envVars seem to be obtained from the current instance of build run containing HOME variable. And that's why the CVS update/checkout works fine.

Line 106 at AbstractCvs.java
final EnvVars envVars = build.getEnvironment(listener);

Fix

I am not sure yet what the best way to approach this problem is. Few things I am exploring are

  1. Investigate why getLastBuild().getEnvironment(listener) doesnt seem to contain HOME variable
  2. Modifying protected PollingResult compareRemoteRevisionWith to obtain complete list of envVars

Any help or pointers in the right direction would be highly appreciated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to