18 lines
944 B
Groovy
18 lines
944 B
Groovy
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
|
|
|
|
def registerConfigurationInfo(meta, String configurationName, String configurationURL, String configurationVersion, String configurationSHA) {
|
|
meta.addConfigurationInfo(configurationName, configurationURL, configurationVersion, configurationSHA)
|
|
}
|
|
|
|
def registerPipelineScriptConfiguration(meta) {
|
|
registerConfigurationInfo(meta, 'pipeline script', '-', '-', gh.getGitInfo(autobuilder.getautobuildpath()))
|
|
}
|
|
|
|
def gitCheckoutAndRegister(meta, String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true, String filter = '') {
|
|
def ArrayList<String> sparseitemlist = gh.convertSparseItemsString(filter)
|
|
gh.gitCheckoutAlt(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone)
|
|
|
|
registerConfigurationInfo(meta, tool, gitURL, revision, gh.getGitInfo(targetDir))
|
|
}
|
|
|
|
return this
|