From 470739b0d07b348535adddcdc83ea775a2af5dfa Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Tue, 28 Apr 2020 20:49:39 +0800 Subject: lkft android: surpport merge from android-4.14-stable/android-4.19-stable kernels also changed to use one build to merge for all kernels, instead of doing the merge operation with one build per branch Change-Id: I8206da97f0d620c674f99446b1fad945477f57a8 Signed-off-by: Yongqin Liu --- lkft-hikey-merge-mirrors.yaml | 119 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 lkft-hikey-merge-mirrors.yaml (limited to 'lkft-hikey-merge-mirrors.yaml') diff --git a/lkft-hikey-merge-mirrors.yaml b/lkft-hikey-merge-mirrors.yaml new file mode 100644 index 0000000000..e792f25a1a --- /dev/null +++ b/lkft-hikey-merge-mirrors.yaml @@ -0,0 +1,119 @@ +- job: + name: lkft-hikey-merge-mirrors + project-type: freestyle + defaults: global + properties: + - authorization: + anonymous: + - job-read + - job-extended-read + linaro: + - job-build + - job-cancel + - build-discarder: + days-to-keep: 180 + num-to-keep: 150 + artifact-num-to-keep: 1 + parameters: + - string: + name: KERNEL_BRANCH + - string: + name: KERNEL_DESCRIBE + - string: + name: SRCREV_kernel + - string: + name: MAKE_KERNELVERSION + disabled: false + node: docker-xenial-android-lkft + display-name: 'LKFT - merge changes from mirror branches for hikey-linaro kernels' + scm: + - git: + remotes: + - linaro: + url: ssh://ci-bot@android-review.linaro.org:29418/kernel/hikey-linaro.git + refspec: +refs/heads/android-hikey-linaro-4.14-stable-lkft:refs/remotes/linaro/android-hikey-linaro-4.14-stable-lkft +refs/heads/android-hikey-linaro-4.19lkft:refs/remotes/linaro/android-hikey-linaro-4.19-lkft +refs/heads/android-hikey-linaro-4.19-stable-lkft:refs/remotes/linaro/android-hikey-linaro-4.19-stable-lkft + credentials-id: 'CI_BOT_SSH_KEY' + - aosp: + url: https://android.googlesource.com/kernel/hikey-linaro + refspec: +refs/heads/mirror-android-4.14-stable:refs/remotes/aosp/mirror-android-4.14-stable +refs/heads/mirror-android-4.19:refs/remotes/aosp/mirror-android-4.19 +refs/heads/mirror-android-4.19-stable:refs/remotes/aosp/mirror-android-4.19-stable + branches: + - aosp/mirror-android-4.14-stable + - aosp/mirror-android-4.19 + - aosp/mirror-android-4.19-stable + git-config-name: 'Linaro CI' + git-config-email: 'ci-bot@linaro.org' + skip-tag: true + shallow-clone: false + wipe-workspace: false + wrappers: + - timestamps + - build-name: + name: '#${BUILD_NUMBER}-${ENV,var="KERNEL_DESCRIBE"}-${ENV,var="MAKE_KERNELVERSION"}' + - timeout: + timeout: 500 + - ssh-agent-credentials: + users: + - 'CI_BOT_SSH_KEY' + builders: + - shell: | + #!/bin/bash -ex + git clean -fdx + env + + ssh-keyscan -p 29418 android-review.linaro.org >> ~/.ssh/known_hosts + + git config --global user.name "Linaro CI" + git config --global user.email "ci-bot@linaro.org" + + case "X${KERNEL_BRANCH}" in + "Xmirror-android-4.14-stable") + target_branch="android-hikey-linaro-4.14-stable-lkft" + ;; + "Xmirror-android-4.19") + target_branch="android-hikey-linaro-4.19-lkft" + ;; + "Xmirror-android-4.19-stable") + target_branch="android-hikey-linaro-4.19-stable-lkft" + ;; + "X*") + target_branch="" + ;; + esac + + git checkout -B ${target_branch} linaro/${target_branch} + git merge --no-edit aosp/${KERNEL_BRANCH} + # push to the remote branch + git push linaro HEAD:${target_branch} + + # Apply tag + tag=${KERNEL_DESCRIBE}-$(date +"%Y%m%d")-${BUILD_NUMBER} + git tag ${tag} + + # Push tag + git push linaro ${tag} + + publishers: + - logparser: + parse-rules: '/var/jenkins_home/userContent/android.parse' + unstable-on-warning: false + fail-on-error: false + - fingerprint: + files: 'build/fingerprints/*' + - groovy-postbuild: + script: + !include-raw: openembedded-lkft/postbuild.groovy + - email: + recipients: 'yongqin.liu@linaro.org' + subject: '[CI] HiKey/HiKey960 merge chagnes from mirror builds: ${KERNEL_BRANCH} ${SRCREV_kernel} ${BUILD_STATUS}' + body: | + Build URL: ${PROJECT_URL}${BUILD_NUMBER}/ + Full log: ${PROJECT_URL}${BUILD_NUMBER}/consoleText + Parsed warnings/errors: ${PROJECT_URL}${BUILD_NUMBER}/parsed_console + Git branch: ${KERNEL_BRANCH} + Git URL: ${KERNEL_REPO} + Git commit: ${SRCREV_kernel} + + Errors: + ${BUILD_LOG_REGEX, regex="^ERROR:.* ", linesBefore=0, linesAfter=0, showTruncatedLines=false} + presend-script: + !include-raw: openembedded-lkft/presend-script.groovy -- cgit v1.2.3