|
||||||||
|
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 |
||||||||
- [JIRA] (JENKINS-14951) In a Matrix job, Environmen... [email protected] (JIRA)

Issues still occurs when the env is stored on matrix builds.
It seems that on the matrix builds the Captured Environment Action is not being created for the parent.
Even with the Captured Environment Action being created for the parent the issue is still seen.
The problem here is that build wrappers setup()[1] are not called in a MatrixBuild doRun() (build class for the parent of the matrix project).
MatrixBuild extends from AbstractBuild not Build class.
Where as it is called for the individual Matrix Runs [2] which do not override the doRun() method of Build so calling the wrapper and adding the environment.
MatrixRun extends Build which extends AbstractBuild
So this also raises the issue that if run with "Run Only On Parent" is checked then none of the variables as avaliable in the child jobs, always giving the "ERROR: [environment-script] Unable to load persisted environment from matrix parent job, not injecting any variables" in the logs.
[1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/MatrixBuild.java#L340
[2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Build.java#L154