diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85b1ce797c9b79e505a7b0c99eb974a96d20cab7..10b3eff518c49e6e31893ae7d0bf9ae2ee7aa831 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -202,11 +202,13 @@ publish-seco-intel-b68: extends: .lava-test variables: CI_LAVA_JOB_PRIORITY: "high" + CI_SQUAD_GROUP_NAME: "merge-request" + CI_SQUAD_PROJECT_NAME: "oniro" .lava-test-scheduled: extends: .lava-test variables: - CI_SQUAD_PROJECT_NAME: "oniro" + CI_SQUAD_GROUP_NAME: "scheduled-daily" rules: - if: '$CI_SQUAD_TOKEN == null' when: never @@ -286,6 +288,7 @@ lava-qemu-x86-ltp: CI_BUILD_JOB_NAME: linux-qemu-x86-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-qemu-x86_64-ltp: needs: [linux-qemu-x86_64-gcc] @@ -296,6 +299,7 @@ lava-qemu-x86_64-ltp: CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-raspberrypi4-64-ltp: needs: [linux-raspberrypi4-64-gcc] @@ -306,6 +310,7 @@ lava-raspberrypi4-64-ltp: CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-seco-intel-b68-ltp: needs: [linux-seco-intel-b68-gcc] @@ -316,6 +321,7 @@ lava-seco-intel-b68-ltp: CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-intel-b68-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-seco-c61-4gb-ltp: needs: [linux-seco-imx8mm-c61-4gb-gcc] @@ -327,6 +333,7 @@ lava-seco-c61-4gb-ltp: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-seco-c61-2gb-ltp: needs: [linux-seco-imx8mm-c61-2gb-gcc] @@ -338,6 +345,7 @@ lava-seco-c61-2gb-ltp: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-2gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-ltp.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "ltp" lava-qemu-x86_64-kselftest: needs: [linux-qemu-x86_64-gcc] @@ -348,6 +356,7 @@ lava-qemu-x86_64-kselftest: CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-kselftest.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "kselftest" lava-raspberrypi4-64-kselftest: needs: [linux-raspberrypi4-64-gcc] @@ -358,6 +367,7 @@ lava-raspberrypi4-64-kselftest: CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-kselftest.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "kselftest" lava-seco-c61-4gb-kselftest: needs: [linux-seco-imx8mm-c61-4gb-gcc] @@ -369,6 +379,7 @@ lava-seco-c61-4gb-kselftest: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-kselftest.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "kselftest" lava-seco-c61-2gb-kselftest: needs: [linux-seco-imx8mm-c61-2gb-gcc] @@ -380,6 +391,7 @@ lava-seco-c61-2gb-kselftest: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-2gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-kselftest.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "kselftest" lava-zephyr-96b-nitrogen-twister: needs: [zephyr-96b-nitrogen-twister-gcc] @@ -390,6 +402,7 @@ lava-zephyr-96b-nitrogen-twister: CI_BUILD_JOB_NAME: zephyr-96b-nitrogen-twister-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/nitrogen-twister.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "zephyr" lava-qemu-x86-perf: needs: [linux-qemu-x86-gcc] @@ -400,6 +413,7 @@ lava-qemu-x86-perf: CI_BUILD_JOB_NAME: linux-qemu-x86-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-qemu-x86_64-perf: needs: [linux-qemu-x86_64-gcc] @@ -410,6 +424,7 @@ lava-qemu-x86_64-perf: CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-raspberrypi4-64-perf: needs: [linux-raspberrypi4-64-gcc] @@ -420,6 +435,7 @@ lava-raspberrypi4-64-perf: CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-seco-intel-b68-perf: needs: [linux-seco-intel-b68-gcc] @@ -430,6 +446,7 @@ lava-seco-intel-b68-perf: CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-intel-b68-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-seco-c61-4gb-perf: needs: [linux-seco-imx8mm-c61-4gb-gcc] @@ -441,6 +458,7 @@ lava-seco-c61-4gb-perf: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-seco-c61-2gb-perf: needs: [linux-seco-imx8mm-c61-2gb-gcc] @@ -452,6 +470,7 @@ lava-seco-c61-2gb-perf: CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-2gb-gcc CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-perf.yaml" CI_REPORT_JOB_NAME: lava-report + CI_SQUAD_PROJECT_NAME: "perf" lava-zephyr-qemu-cortex-m3: needs: [zephyr-qemu-cortex-m3-gcc] diff --git a/.oniro-ci/test-generic.yaml b/.oniro-ci/test-generic.yaml index 87ae423f01875c7d6e1f5aa6ee67b754085b4414..5041db7c1118e73663cfcec0300282a4804626d5 100644 --- a/.oniro-ci/test-generic.yaml +++ b/.oniro-ci/test-generic.yaml @@ -12,7 +12,8 @@ GIT_STRATEGY: none CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/" CI_SQUAD_INSTANCE: "https://squadp.svc.ostc-eu.dev" - CI_SQUAD_PROJECT_NAME: "oniro-test-mr" + CI_SQUAD_GROUP_NAME: "" + CI_SQUAD_PROJECT_NAME: "" CI_LAVA_JOB_PRIORITY: "medium" # Run the same ltp test suites that using by LKFT project. # Reference: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.98-75-g9f5cb871ceb9/testjobs/ @@ -32,7 +33,13 @@ echo "precondition failed - set CI_LAVA_JOB_DEFINITION to the URL of the LAVA test job definition" && exit 1 ) - test -n "$CI_REPORT_JOB_NAME" || ( - echo "precondition failed - set CI_REPORT_JOB_NAME to the CI job name which will gather results back from LAVA" + echo "precondition failed - set CI_REPORT_JOB_NAME to the CI job name which will gather results back from Squad" + && exit 1 ) + - test -n "$CI_SQUAD_GROUP_NAME" || ( + echo "precondition failed - set CI_SQUAD_GROUP_NAME to the squad group name." + && exit 1 ) + - test -n "$CI_SQUAD_PROJECT_NAME" || ( + echo "precondition failed - set CI_SQUAD_PROJECT_NAME to the squad project name." && exit 1 ) # If the test job name contains 'sysota', usage of update job name is # required. @@ -85,8 +92,8 @@ # Submit the jobs to SQUAD. - | for job_def in $(find lava_jobs/ -name "*.yaml"); do - echo $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" - curl $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" + echo $CI_SQUAD_INSTANCE/api/submitjob/$CI_SQUAD_GROUP_NAME/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" + curl $CI_SQUAD_INSTANCE/api/submitjob/$CI_SQUAD_GROUP_NAME/$CI_SQUAD_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}" done # Attach a callback to this build to trigger the lava-report job squad_build_id="$(curl --silent "$CI_SQUAD_INSTANCE/api/builds/?version=$CI_PIPELINE_ID" | jq -r '.results[0].id')"