From 9ca3acf243863de4dcfaecd3fc16c6879c8418fb Mon Sep 17 00:00:00 2001 From: Thomas Duckworth Date: Fri, 15 May 2026 21:18:00 +1000 Subject: [PATCH] Introduce OpenQA testing Integrates the OpenQA pipelines from kde-linux/os-autoinst-distri-kdelinux into CI. --- .gitlab-ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57546e9..e736f7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,7 @@ include: stages: - validate - start + - test imaging: stage: start @@ -32,6 +33,9 @@ imaging: RUNNER_AFTER_SCRIPT_TIMEOUT: 1h script: - sudo ./build.sh --force --debug # bootstap.sh happens as part of CI image build + - | + RAW_FILE=$(find mkosi.output -maxdepth 1 -name '*.raw' ! -name '*.test.raw' | head -1 | xargs -r basename) + echo "IMAGE_URL=https://storage.kde.org/ci-artifacts/${CI_PROJECT_PATH}/j/${CI_JOB_ID}/${RAW_FILE}" >> build.env after_script: - ./upload-to-storage.sh || true artifacts: &artifacts @@ -39,6 +43,8 @@ imaging: when: always paths: - "**/erofs.log" + reports: + dotenv: build.env imaging+publish: stage: start @@ -56,9 +62,44 @@ imaging+publish: script: - sudo pacman --sync --refresh --noconfirm curl which git - curl -s https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer | bash - - sudo ./build.sh --force --debug # bootstap.sh happens as part of CI image build + - sudo ./build.sh --force --debug # bootstrap.sh happens as part of CI image build - ./upload.sh + - echo "IMAGE_URL=https://storage.kde.org/kde-linux/testing/$(basename upload-tree/testing/*.raw)" >> build.env after_script: # Upload broken images to Harald for inspection - "[ $CI_JOB_STATUS == 'success' ] || ./upload-to-storage.sh || true" artifacts: *artifacts + +trigger-openqa: + stage: test + rules: + - if: $CI_MERGE_REQUEST_DRAFT == "true" + when: manual + - if: $CI_COMMIT_BRANCH =~ /^work\// + when: manual + - if: $CI_COMMIT_REF_PROTECTED != 'true' || $CI_DEFAULT_BRANCH != $CI_COMMIT_REF_NAME || $CI_PROJECT_PATH != 'kde-linux/kde-linux' + when: on_success + needs: + - job: imaging + artifacts: true + trigger: + project: kde-linux/os-autoinst-distri-kdelinux + branch: master + strategy: depend + variables: + IMAGE_URL: $IMAGE_URL + +trigger-openqa-publish: + stage: test + rules: + - if: $CI_COMMIT_REF_PROTECTED == 'true' && $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == 'kde-linux/kde-linux' + when: on_success + needs: + - job: imaging+publish + artifacts: true + trigger: + project: kde-linux/os-autoinst-distri-kdelinux + branch: master + strategy: depend + variables: + IMAGE_URL: $IMAGE_URL