Allow picking different manifest based on boardName
- Excelsior's manifest currently lives elsewhere. Pick by board name.
- Add a rewrite rule for excelsior.
Change-Id: I7984bcdf22bbce5439c0f9574d65d20bd865e87a
diff --git a/vars/functions.groovy b/vars/functions.groovy
index ee41cf1..9e7ae84 100644
--- a/vars/functions.groovy
+++ b/vars/functions.groovy
@@ -5,17 +5,19 @@
/opt/gcompute-tools/git-cookie-authdaemon
git config --global url.https://aiyprojects.googlesource.com/.insteadOf sso://aiyprojects/
+ git config --global url.https://excelsior.googlesource.com/.insteadOf sso://excelsior/
mkdir -p .repo/local_manifests
mkdir -p cache
chmod 777 cache .repo/local_manifests
"""
+
timeout(time: 20, unit: 'MINUTES') {
checkout([$class: 'RepoScm',
currentBranch: true,
jobs: 24,
- manifestRepositoryUrl: 'http://coral.googlesource.com/manifest',
+ manifestRepositoryUrl: manifestUrlFromBoardName(boardName),
manifestBranch: 'master',
manifestFile: "${boardName}.xml",
manifestGroup: "default,internal",
@@ -41,6 +43,17 @@
sh "bash -c 'source build/setup.sh; m -j${nprocs} prereqs ${targetName}; exit \$?'"
}
+def manifestUrlFromBoardName(boardName) {
+ switch (boardName) {
+ case "excelsior":
+ return "http://aiyprojects.googlesource.com/manifest"
+ case "enterprise":
+ return "http://coral.googlesource.com/manifest"
+ default:
+ error "Unknown board ${boardName}"
+ }
+}
+
def nameFromRepoType(repoType, boardName) {
if (repoType == "core") {
return "core"