Adding ability to pass several repos
The patch adds ability to pass several repos to build
packages.
Change-Id: Iaa38e8e467ce4852d51b5bf31d4e7e2c4a9d7738
Related-PROD: PROD-18252
diff --git a/src/com/mirantis/mk/Debian.groovy b/src/com/mirantis/mk/Debian.groovy
index 2d75d1e..ff05ce3 100644
--- a/src/com/mirantis/mk/Debian.groovy
+++ b/src/com/mirantis/mk/Debian.groovy
@@ -38,10 +38,11 @@
export DEBUG="${debug}" &&
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH:+"\$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata &&
export LD_PRELOAD=\${LD_PRELOAD:+"\$LD_PRELOAD "}libeatmydata.so &&
- [[ -z "${extraRepoUrl}" && "${extraRepoUrl}" != "null" ]] || echo "${extraRepoUrl}" >/etc/apt/sources.list.d/extra.list &&
+ [[ -z "${extraRepoUrl}" && "${extraRepoUrl}" != "null" ]] || echo "${extraRepoUrl}" | tr ";" "\\\\n" >/etc/apt/sources.list.d/extra.list &&
[[ -z "${extraRepoKeyUrl}" && "${extraRepoKeyUrl}" != "null" ]] || (
which curl || (apt-get update && apt-get install -y curl) &&
- curl --insecure -ss -f "${extraRepoKeyUrl}" | apt-key add -
+ EXTRAKEY=`echo "${extraRepoKeyUrl}" | tr ";" " "` &&
+ for RepoKey in \${EXTRAKEY}; do curl --insecure -ss -f "\${RepoKey}" | apt-key add - ; done
) &&
apt-get update && apt-get install -y build-essential devscripts equivs sudo &&
groupadd -g ${jenkinsGID} jenkins &&
@@ -53,7 +54,6 @@
sudo -H -E -u jenkins debuild --preserve-envvar DEBUG --no-lintian -uc -us -b'""")
}
-
}
/*