aboutsummaryrefslogtreecommitdiff
path: root/lkft-android-common-gateway.yaml
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2021-03-09 11:13:36 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2021-03-09 07:41:01 +0000
commit02f5347900f7e61ad5dec3cbef80dba8a8913797 (patch)
tree9df664686cc81981c6ea2def35d0fe69112f6848 /lkft-android-common-gateway.yaml
parentb8340d2078bf114aa6713fb32f9045122979ff6a (diff)
lkft: enable to trigger only one build for the same kernel minor version
this is still experiment Change-Id: I1e002a95936765877ce00b9c66f0859e2f76a0b4 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'lkft-android-common-gateway.yaml')
-rw-r--r--lkft-android-common-gateway.yaml110
1 files changed, 110 insertions, 0 deletions
diff --git a/lkft-android-common-gateway.yaml b/lkft-android-common-gateway.yaml
new file mode 100644
index 0000000000..0849376ba0
--- /dev/null
+++ b/lkft-android-common-gateway.yaml
@@ -0,0 +1,110 @@
+- job:
+ name: lkft-android-common-gateway
+ 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: 300
+ parameters:
+ - string:
+ name: KERNEL_DESCRIBE
+ - string:
+ name: KERNEL_BRANCH
+ - string:
+ name: SRCREV_kernel
+ - string:
+ name: MAKE_KERNELVERSION
+ - string:
+ name: IGNORE_KERNELVERSION_CHECK
+ default: "false"
+ disabled: false
+ node: triggers
+ display-name: 'Trigger for changes on android common kernel'
+ wrappers:
+ - timestamps
+ - build-name:
+ name: '#${BUILD_NUMBER}-${KERNEL_DESCRIBE}-${KERNEL_BRANCH}'
+ - ssh-agent-credentials:
+ users:
+ - 'CI_BOT_SSH_KEY'
+ builders:
+ - shell: |
+ #!/bin/bash -ex
+
+ rm -f "all-kernels.txt" "api_callbacks_properties.txt" "lkft-${KERNEL_BRANCH}.txt" "lkft-${KERNEL_BRANCH}-x15.txt" "lkft-${KERNEL_BRANCH}-hikey.txt"
+ skip_build=false
+ if [ "X${IGNORE_KERNELVERSION_CHECK}X" == "XfalseX" ]; then
+ 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"
+ git clone -b lkft ssh://ci-bot@android-review.linaro.org:29418/android-build-kernel-versions android-build-kernel-versions
+ ./android-lkft-kernel-versions/get-update.sh "${KERNEL_BRANCH}" "${MAKE_KERNELVERSION}"
+ check_status=$?
+ if [ ${check_status} -eq 1 ]; then
+ skip_build=true
+ fi
+ fi
+
+ if ${skip_build}; then
+ # create the fake file for the inject following
+ touch api_callbacks_properties.txt
+ else
+ params="lkft-${KERNEL_BRANCH}.txt"
+ echo "KERNEL_DESCRIBE=${KERNEL_DESCRIBE}" >> "${params}"
+ echo "SRCREV_kernel=${GIT_COMMIT}" >> "${params}"
+ echo "MAKE_KERNELVERSION=${MAKE_KERNELVERSION}" >> "${params}"
+ echo "KERNEL_BRANCH=${KERNEL_BRANCH}" >> "${params}"
+ cat "${params}"
+
+ case "X${KERNEL_BRANCH}" in
+ "Xandroid12-5.4")
+ cp -fv "${params}" lkft-${KERNEL_BRANCH}-x15.txt
+ echo "ANDROID_BUILD_CONFIG=lkft-x15-aosp-master-5.4" >> lkft-${KERNEL_BRANCH}-x15.txt
+ ;;
+ "Xandroid-mainline")
+ cp -fv "${params}" lkft-${KERNEL_BRANCH}-x15.txt
+ echo "ANDROID_BUILD_CONFIG=lkft-x15-aosp-master-mainline" >> lkft-${KERNEL_BRANCH}-x15.txt
+
+ cp -fv "${params}" lkft-${KERNEL_BRANCH}-hikey.txt
+ echo "ANDROID_BUILD_CONFIG=lkft-hikey-aosp-master-mainline-gki" >> lkft-${KERNEL_BRANCH}-hikey.txt
+ ;;
+ "X*")
+ echo "No particular build for this branch: ${KERNEL_BRANCH}"
+ ;;
+ esac
+
+ # generate files for the api callback build and gki build
+ QA_BUILD_VERSION=${KERNEL_DESCRIBE}
+ f_gki_kernel="all-kernels.txt"
+ cp -fv "${params}" "${f_gki_kernel}"
+ echo "QA_BUILD_VERSION=${QA_BUILD_VERSION}" >> ${f_gki_kernel}
+ echo "CALLER_JOB_NAME=${JOB_NAME}" >> ${f_gki_kernel}
+ echo "CALLER_BUILD_NUMBER=${BUILD_NUMBER}" >>${f_gki_kernel}
+ echo "ANDROID_BUILD_CONFIG=lkft-gki-${KERNEL_BRANCH}" >>${f_gki_kernel}
+ # TODO needs to be removed when used officially
+ echo "ANDROID_BUILD_CONFIG_TO_BE_TRIGGERED=lkft-not-exist-for-test" >>${f_gki_kernel}
+
+ cp -fv "${f_gki_kernel}" "api_callbacks_properties.txt"
+ fi
+
+ - inject:
+ properties-file: api_callbacks_properties.txt
+ - shell:
+ !include-raw:
+ - lkft/common/api-callbacks.sh
+
+ - trigger-builds:
+ - project: lkft-gki-kernel
+ property-file: all-kernels.txt
+ # TODO: needs to add other x15/hikey projects
+ publishers:
+ - email:
+ recipients: 'yongqin.liu@linaro.org'