+ stage("Checkout") {
+ checkout scm
+ }
+
+ // Copy the artifacts from the upstream jobs
+ stage("Copy Artifacts") {
+ // cleanup any previous repo
+ sh 'rm -rf repo'
+
+ dir('repo') {
+ // grab all stable upstream builds based on the
+ // given target UPSTREAM_SUFFIX
+
+ def list = ["SO", "UI", "RO", "openvim", "osmclient"]
+ for (component in list) {
+ step ([$class: 'CopyArtifact',
+ projectName: "${component}_${params.UPSTREAM_SUFFIX}"])
+ sh "dpkg-sig --sign builder -k dpkg1 pool/${component}/*"
+ // cleanup any prevously defined dists
+ sh "rm -rf dists"
+ }
+
+ // now create the distro
+ for (component in list) {
+ 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"
+ }
+
+ // create and sign the release file
+ sh "apt-ftparchive release dists/${params.REPO_DISTRO} > dists/${params.REPO_DISTRO}/Release"
+ sh "gpg --yes -abs -u dpkg1 -o dists/${params.REPO_DISTRO}/Release.gpg dists/${params.REPO_DISTRO}/Release"
+ sh "rsync -avz . ${params.RSYNC_DESTINATION}/${params.RELEASE}"
+ }
+ }
+