aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lkft-android-common-gateway.yaml110
-rw-r--r--trigger-hikey-stable.yaml123
2 files changed, 154 insertions, 79 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'
diff --git a/trigger-hikey-stable.yaml b/trigger-hikey-stable.yaml
index 5a6becfa71..845118af4e 100644
--- a/trigger-hikey-stable.yaml
+++ b/trigger-hikey-stable.yaml
@@ -14,90 +14,55 @@
days-to-keep: 30
num-to-keep: 30
disabled: false
- node: docker-bionic-android-lkft
+ node: triggers
display-name: 'TOBEDELETED: only used for test purpose'
- parameters:
- - string:
- name: BUILD_DIR
- default: lkft
- - string:
- name: ANDROID_BUILD_CONFIG
- default: ''
- - string:
- name: KERNEL_DESCRIBE
- - string:
- name: KERNEL_BRANCH
- - string:
- name: SRCREV_kernel
- - string:
- name: BUILD_REFERENCE_IMAGE_GZ_URL
- - string:
- name: MAKE_KERNELVERSION
+ scm:
+ - git:
+ remotes:
+ - android-common:
+ url: https://android.googlesource.com/kernel/common
+ - linux-stable:
+ url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
+ refspec: +refs/heads/linux-5.4.y:refs/remotes/linux-stable/linux-5.4.y +refs/heads/master:refs/remotes/master/master
+ branches:
+ - android-common/android-mainline
+ - android-common/android12-5.10
+ - android-common/android12-5.4
+ - android-common/android11-5.4
+ - android-common/android11-5.4-lts
+ skip-tag: true
+ shallow-clone: false
+ wipe-workspace: false
+ triggers:
+ - pollscm:
+ cron: 'H/5 * * * *'
wrappers:
- timestamps
- build-name:
- name: '#${BUILD_NUMBER}-${KERNEL_DESCRIBE}-${ANDROID_BUILD_CONFIG}'
- - timeout:
- timeout: 500
- - credentials-binding:
- - text:
- credential-id: QA_REPORTS_TOKEN
- variable: QA_REPORTS_TOKEN
- - text:
- credential-id: ARTIFACTORIAL_TOKEN
- variable: ARTIFACTORIAL_TOKEN
- - text:
- credential-id: AP_SSID_OEM
- variable: AP_SSID
- - text:
- credential-id: AP_KEY
- variable: AP_KEY
+ name: '#${BUILD_NUMBER}-${PROPFILE,file="properties.txt",property="KERNEL_DESCRIBE"}-${GIT_BRANCH#android-common/}'
builders:
- - shell:
- !include-raw: lkft/common/builders-v2.sh
- - linaro-publish-token
- - shell:
- !include-raw: lkft/common/publisher-v2.sh
- - shell:
- !include-raw: lkft/lava-job-definitions/submit_for_testing-v2.sh
+ - shell: |
+ #!/bin/bash -ex
+ git clean -fdx
+ env
+
+ MAKE_KERNELVERSION=$(make kernelversion)
+ KERNEL_BRANCH=${GIT_BRANCH#android-common/}
+ KERNEL_DESCRIBE=${MAKE_KERNELVERSION}-${GIT_COMMIT:0:12}
+
+ echo KERNEL_DESCRIBE=${KERNEL_DESCRIBE} > properties.txt
+ echo KERNEL_BRANCH=${KERNEL_BRANCH} >> properties.txt
+
+ params=lkft-parameters.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
+
+ - trigger-builds:
+ - project: lkft-android-common-gateway
+ property-file: lkft-parameters.txt
publishers:
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - FAILURE
- build-steps:
- - shell:
- !include-raw: lkft/common/postbuildscript-v2.sh
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - FAILURE
- build-steps:
- - shell:
- !include-raw: lkft/common/postbuildscript-v2.sh
- - 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] HiKey960 mainline gki + aosp master + QGSI: ${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