From 9db498910c4a55ee3b707d32586572a5990ed183 Mon Sep 17 00:00:00 2001 From: Olev Kartau Date: Sat, 1 Jul 2017 21:50:09 +0300 Subject: [PATCH 1/4] CI: Try to use Docker container from crops:yocto/ubuntu-16 Signed-off-by: Olev Kartau --- Jenkinsfile | 2 +- docker/crops-yocto-ubuntu-16/Dockerfile | 23 +++++++++++++++++++++++ docker/local-build.sh | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 docker/crops-yocto-ubuntu-16/Dockerfile diff --git a/Jenkinsfile b/Jenkinsfile index 98a4805375..5c16351260 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -283,7 +283,7 @@ def checkout_content(is_pr, pr_num) { def build_docker_image(image_name) { // Base container OS to use, see docker configs in docker/ - def build_os = "opensuse-42.2" + def build_os = "crops-yocto-ubuntu-16" def build_args = [ build_proxy_args(), build_user_args()].join(" ") sh "docker build -t ${image_name} ${build_args} docker/${build_os}" dockerFingerprintFrom dockerfile: "docker/${build_os}/Dockerfile", image: "${image_name}" diff --git a/docker/crops-yocto-ubuntu-16/Dockerfile b/docker/crops-yocto-ubuntu-16/Dockerfile new file mode 100644 index 0000000000..b657a9d47e --- /dev/null +++ b/docker/crops-yocto-ubuntu-16/Dockerfile @@ -0,0 +1,23 @@ +FROM crops/yocto:ubuntu-16.04-base + +# non-default docker proxy vars +ARG ALL_PROXY +ARG socks_proxy +ARG SOCKS_PROXY + +ENV JENKINS_HOME /var/lib/jenkins + +ARG user=jenkins +ARG group=jenkins +ARG uid=1000 +ARG gid=1000 + +USER root + +RUN groupadd -o -g ${gid} ${group} \ + && useradd -d "$JENKINS_HOME" -u ${uid} -g ${gid} -m -s /bin/bash ${user} + +# VOLUME ${JENKINS_HOME} + +USER jenkins +WORKDIR ${JENKINS_HOME} diff --git a/docker/local-build.sh b/docker/local-build.sh index 26be2c8475..03b1db0b97 100755 --- a/docker/local-build.sh +++ b/docker/local-build.sh @@ -8,7 +8,7 @@ fi CURRENT_PROJECT=refkit BUILD_DIR=${BUILD_DIR:-${WORKSPACE}/build} BUILD_CACHE_DIR=$BUILD_DIR/bb-cache -BUILDOS="opensuse-42.2" +BUILDOS="crops-yocto-ubuntu-16" GIT_PROXY_COMMAND=oe-git-proxy TARGET_MACHINE="intel-corei7-64" From 6151f774e6dcadb5b4c81d8d18837923d05bbfce Mon Sep 17 00:00:00 2001 From: Olev Kartau Date: Sun, 9 Jul 2017 13:51:44 +0300 Subject: [PATCH 2/4] crops dockerfile: add pkgs for unittest and xmlrunner Signed-off-by: Olev Kartau --- docker/crops-yocto-ubuntu-16/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/crops-yocto-ubuntu-16/Dockerfile b/docker/crops-yocto-ubuntu-16/Dockerfile index b657a9d47e..c007d50a45 100644 --- a/docker/crops-yocto-ubuntu-16/Dockerfile +++ b/docker/crops-yocto-ubuntu-16/Dockerfile @@ -14,6 +14,11 @@ ARG gid=1000 USER root +#RUN apt-get install -y python3-unittest2 python3-six +RUN apt-get install -y python3-pip +RUN pip3 install unittest-xml-reporting + + RUN groupadd -o -g ${gid} ${group} \ && useradd -d "$JENKINS_HOME" -u ${uid} -g ${gid} -m -s /bin/bash ${user} From 9855ea7a65a15154b2002dabae060d5f90b78e71 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 11 Jul 2017 10:59:12 +0200 Subject: [PATCH 3/4] docker: dump content of conf files "How was the CI build configured?" is a common question when something does not work as expected. The new auto_dump prints all *.conf files with line numbers and name each time that the configuration gets created. Signed-off-by: Patrick Ohly --- docker/build-common-util.sh | 4 ++++ docker/build-project.sh | 1 + docker/post-build.sh | 2 +- docker/pre-build.sh | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/build-common-util.sh b/docker/build-common-util.sh index 4f980e4f38..3455e4dc0e 100644 --- a/docker/build-common-util.sh +++ b/docker/build-common-util.sh @@ -69,3 +69,7 @@ auto_conf_testsdk() { INHERIT += "testsdk" EOF } + +auto_dump() { + grep -n '.*' conf/*.conf +} diff --git a/docker/build-project.sh b/docker/build-project.sh index 19a794bef2..c596088d4c 100755 --- a/docker/build-project.sh +++ b/docker/build-project.sh @@ -61,6 +61,7 @@ if [ ! -z ${JOB_NAME+x} ]; then # in CI run only: auto_conf_buildhistory fi +auto_dump export BUILD_ID=${CI_BUILD_ID} export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE BUILD_ID" diff --git a/docker/post-build.sh b/docker/post-build.sh index 177f25da99..1f8b214063 100755 --- a/docker/post-build.sh +++ b/docker/post-build.sh @@ -27,8 +27,8 @@ set -u # create auto.conf using functions in build-common-util.sh auto_conf_common - auto_conf_testsdk +auto_dump # post-build testing builds images but only .wic is sufficient # (default in IMAGE_FSTYPES). We skip compression and bmap formats diff --git a/docker/pre-build.sh b/docker/pre-build.sh index 0e19accaed..211f872362 100755 --- a/docker/pre-build.sh +++ b/docker/pre-build.sh @@ -33,6 +33,7 @@ set -u # create auto.conf using functions in build-common-util.sh auto_conf_common +auto_dump export BUILD_ID=${CI_BUILD_ID} export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE BUILD_ID" From cc78ec02516d1e9e9f248a2bdab8f16db15be53d Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 17 Jul 2017 11:49:40 +0200 Subject: [PATCH 4/4] TEST: bitbake with retry logic in fetcher --- .gitmodules | 2 +- bitbake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index a0f599b790..f86414a62c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,7 @@ branch = master [submodule "bitbake"] path = bitbake - url = http://git.openembedded.org/bitbake + url = http://github.com/pohly/bitbake.git branch = master [submodule "meta-intel"] path = meta-intel diff --git a/bitbake b/bitbake index 4a14b44b3e..3d9e7c5710 160000 --- a/bitbake +++ b/bitbake @@ -1 +1 @@ -Subproject commit 4a14b44b3e4fad3a3e5e53461aa8ba9929a515b8 +Subproject commit 3d9e7c5710d798031c41a28af60959244e90e22f