16 lines
846 B
Groovy
16 lines
846 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) {
|
|
gh.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone)
|
|
registerConfigurationInfo(meta, tool, gitURL, revision, gh.getGitInfo(targetDir))
|
|
}
|
|
|
|
return this
|