+ parallelSteps = [:]
+ def list = ["RO", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"]
+ if (upstreamComponent.length()>0) {
+ println("Skipping upstream fetch of "+upstreamComponent)
+ list.remove(upstreamComponent)
+ }
+ for (buildStep in list) {
+ def component = buildStep
+ parallelSteps[component] = {
+ dir("$component") {
+ println("Fetching artifact for ${component}")
+ step ([$class: 'CopyArtifact',
+ projectName: "${component}${upstream_main_job}/${GERRIT_BRANCH}"])
+
+ // grab the archives from the stage_2 builds (ie. this will be the artifacts stored based on a merge)
+ def packages = ci_helper.get_archive(params.ARTIFACTORY_SERVER,
+ component,
+ GERRIT_BRANCH,
+ "${component}${upstream_main_job} :: ${GERRIT_BRANCH}",
+ ci_helper.get_env_value('build.env','BUILD_NUMBER'))
+ packageList.addAll(packages)
+ println("Fetched ${component}: ${packages}")
+ sh "rm -rf dists"
+ }
+ }
+ }
+ parallel parallelSteps
+
+///////////////////////////////////////////////////////////////////////////////////////
+// Create Devops APT repository
+///////////////////////////////////////////////////////////////////////////////////////
+ sh "mkdir -p pool"
+ for (component in [ "devops", "IM", "osmclient" ]) {
+ sh "ls -al ${component}/pool/"
+ sh "cp -r ${component}/pool/* pool/"
+ sh "dpkg-sig --sign builder -k ${GPG_KEY_NAME} pool/${component}/*"
+ sh "mkdir -p dists/${params.REPO_DISTRO}/${component}/binary-amd64/"
+ sh "apt-ftparchive packages pool/${component} > dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
+ sh "gzip -9fk dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
+ }