-
Improvement
-
Resolution: Unresolved
-
Major
When multiple Git repositories are added to the git plugin (not Multiple SCM plugin), the remoteUrls in the build data JSON are unordered (different from the order in which they were configured in the Jenkins job). This is because the remoteUrls are stored in a HashSet in BuildData.java. We can instead store them in a LinkedHashSet and preserve the order.
This is needed so that we can associate the branch built, origin[x] (where x is the repository index) in lastBuiltRevision with the appropriate repository URL for which there is no provision right now when there are multiple repositories.
{
"buildsByBranchName" : {
"origin/master" : {
"buildNumber" : 1813,
"buildResult" : null,
"revision" :
]
}
},
"origin/mri" : {
"buildNumber" : 50,
"buildResult" : null,
"revision" :
]
}
}
},
"lastBuiltRevision" :
],
"remoteUrls" : [
"https://github.com/repo1.git",
"https://github.com/repo2.git",
]
}