aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2019-04-19 10:28:14 +0100
committerGuillaume Tucker <guillaume.tucker@collabora.com>2019-05-03 12:59:46 +0100
commite1df28e83a10078df56737f30932aaa41d048377 (patch)
tree968d8bedb6dc615395cb5f2b7b91050e64eee00d /src
parentc982969eaa057bb1c194a8c50ee093ba68b5ab9c (diff)
build.jpl: update to use kci_build
Update build.jpl to use the new kci_build commands to build and publish kernel binaries and meta-data instead of the legacy build.py script. Update all the job parameters to use BUILD_CONFIG and BUILD_ENVIRONMENT rather than TREE, TREE_NAME, BRANCH, CC and CC_VERSION parameters. This is made possible by relying more on build-configs.yaml and the kci_build tool to extract this information from it. Also update Job.dockerImageName() to get the Docker image name using the build environment rather than the compiler name and version, accordingly to the changes in kci_build. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'src')
-rw-r--r--src/org/kernelci/util/Job.groovy14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/org/kernelci/util/Job.groovy b/src/org/kernelci/util/Job.groovy
index cbfbabb..0cc1c7b 100644
--- a/src/org/kernelci/util/Job.groovy
+++ b/src/org/kernelci/util/Job.groovy
@@ -43,8 +43,16 @@ def cloneKciCore(path, url, branch) {
}
}
-def dockerImageName(base, cc, cc_version, kernel_arch) {
- def image_name = "${base}${cc}-${cc_version}"
+def dockerImageName(kci_core, build_env, kernel_arch) {
+ def image_name = build_env
+ def cc = null
+
+ dir(kci_core) {
+ def build_env_raw = sh(
+ script: "./kci_build show_build_env --build-env=${build_env}",
+ returnStdout: true).trim()
+ cc = build_env_raw.tokenize('\n')[1]
+ }
if (cc == "gcc") {
def docker_arch
@@ -59,7 +67,7 @@ def dockerImageName(base, cc, cc_version, kernel_arch) {
image_name = "${image_name}_${docker_arch}"
}
- return image_name;
+ return image_name
}
def dockerPullWithRetry(image_name, retries=10, sleep_time=1) {