33 lines
No EOL
1.7 KiB
Groovy
33 lines
No EOL
1.7 KiB
Groovy
// Given details about artifacts to import and details of installers to build, import artifacts that are required
|
|
def Map artifactsImporter(meta, artifactDetails, installerDetails) {
|
|
artifactFetched = [:]
|
|
|
|
def importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
|
for (installer in toBuild) {
|
|
def artifactKey = installerDetails.get(installer)[0]
|
|
(sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetails.get(artifactKey)
|
|
if (artifactFetched.get(artifactKey) == null) {
|
|
def importmeta = importer.artifactimport(meta, sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy)
|
|
artifactFetched.put(artifactKey, importmeta)
|
|
}
|
|
}
|
|
return artifactFetched
|
|
}
|
|
|
|
// Export any required binaries to the <WORKSPACE>/bin folder
|
|
def placeBinaries(artifactDetails, installerDetails) {
|
|
for (installer in toBuild) {
|
|
(artifactSet, targetFolder, executionPath, ISMprojectFile, installerVariant, exportBinaries) = installerDetails.get(installer)
|
|
if (exportBinaries) {
|
|
(artifactsSourceProject, destinationFolder, artifactsToCopy, artifactsToNotCopy, binariesFolders) = artifactDetails.get(artifactSet)
|
|
for (binaryFolder in binariesFolders) {
|
|
binariesSourceFolder = "${destinationFolder}/${binaryFolder}"
|
|
binariesDestFolder = "${WORKSPACE}/bin/${artifactSet}/${binaryFolder}"
|
|
echo "Copying from: ${binariesSourceFolder} to: ${binariesDestFolder}"
|
|
fileOperations([folderCopyOperation(destinationFolderPath: binariesDestFolder, sourceFolderPath: binariesSourceFolder)])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return this; |