From 90a801723ed8a96654612624ec211b125fcc26e7 Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Sat, 27 Sep 2025 01:28:23 +0200 Subject: [PATCH 1/5] archive: use enhanced commit messages when available The archive role was ignoring enhanced commit messages generated by the CI script and always using a hardcoded template instead. This caused kdevops-ci and linux-ci runs to produce identical commit formats rather than the intended distinct formats with proper PASS/FAIL status and commit details. Now the role checks for the enhanced format first and falls back to the legacy template only when the enhanced version is unavailable. Generated-by: Claude AI Signed-off-by: Daniel Gomez --- .../roles/kdevops_archive/tasks/main.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/kdevops_archive/tasks/main.yml b/playbooks/roles/kdevops_archive/tasks/main.yml index 5d11a8a0d..ce88c7f38 100644 --- a/playbooks/roles/kdevops_archive/tasks/main.yml +++ b/playbooks/roles/kdevops_archive/tasks/main.yml @@ -414,6 +414,17 @@ kdevops_archive_ci_test_result: "unknown" when: not ci_result_file.stat.exists +- name: Check if enhanced commit message exists + ansible.builtin.stat: + path: "{{ topdir_path }}/ci.commit_message_enhanced" + register: ci_commit_enhanced_file + +- name: Read enhanced commit message if it exists + ansible.builtin.slurp: + path: "{{ topdir_path }}/ci.commit_message_enhanced" + register: ci_commit_enhanced_content + when: ci_commit_enhanced_file.stat.exists + - name: Create a temporary file for commit message ansible.builtin.tempfile: state: file @@ -421,7 +432,12 @@ prefix: kdevops_commit_msg_ register: tmp_commit_msg -- name: Set commit message +- name: Set enhanced commit message + ansible.builtin.set_fact: + commit_message: "{{ ci_commit_enhanced_content.content | b64decode | trim }}" + when: ci_commit_enhanced_file.stat.exists + +- name: Set fallback commit message ansible.builtin.set_fact: commit_message: | {{ kdevops_archive_test_trigger }}: {{ kdevops_archive_test_subject }} @@ -436,6 +452,7 @@ Detailed test report: {{ kdevops_archive_test_commit }} + when: not ci_commit_enhanced_file.stat.exists - name: Copy commit message into temporary file ansible.builtin.copy: From bd3cae3796389e92254656376c5ae1cd54dfea3d Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Sat, 27 Sep 2025 01:34:35 +0200 Subject: [PATCH 2/5] github: fix runner assignment and job naming for CI types The workflow was incorrectly assigning linux-ci jobs to kdevops-ci runners and using inconsistent job names. This caused confusion about which test mode was actually running and wasted resources on wrong runner pools. Now scheduled runs properly target linux-ci runners and show correct job names, while kdevops-ci runs use their designated runners. The test_mode parameter flows correctly to ensure proper commit message formatting for each CI type. Generated-by: Claude AI Signed-off-by: Daniel Gomez --- .github/workflows/kdevops.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/kdevops.yml b/.github/workflows/kdevops.yml index 60754ba75..e5bb61b6c 100644 --- a/.github/workflows/kdevops.yml +++ b/.github/workflows/kdevops.yml @@ -149,9 +149,14 @@ jobs: exit 1 fi - kdevops-ci-matrix: - name: "${{ github.event.inputs.test_mode || 'kdevops-ci' }}: ${{ matrix.ci_workflow }}" - runs-on: self-hosted + ci-matrix: + name: "${{ github.event_name == 'schedule' && 'linux-ci' || github.event.inputs.test_mode || 'kdevops-ci' }}: ${{ matrix.ci_workflow }}" + runs-on: >- + ${{ + (github.event_name == 'schedule' && fromJSON('["self-hosted", "linux-ci"]')) || + (github.event.inputs.test_mode == 'linux-ci' && fromJSON('["self-hosted", "linux-ci"]')) || + fromJSON('["self-hosted", "kdevops-ci"]') + }} needs: [check_ref, generate_kernel_ref] if: >- always() && @@ -258,7 +263,12 @@ jobs: uses: ./.github/actions/test with: ci_workflow: ${{ matrix.ci_workflow }} - test_mode: ${{ github.event.inputs.test_mode || 'kdevops-ci' }} + test_mode: >- + ${{ + github.event_name == 'schedule' && 'linux-ci' + || github.event.inputs.test_mode + || 'kdevops-ci' + }} tests: ${{ github.event.inputs.tests || '' }} timeout-minutes: 120 From 99ddcb9e222d529e9cdf59a71d5b150b37395151 Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Sun, 28 Sep 2025 20:34:29 +0200 Subject: [PATCH 3/5] Makefile: fix mrproper inventory deletion Use the proper Makefile variable for the kdevops inventory file (hosts). Fixes 0987c300 ("Makefile: use inventory from ansible.cfg") Signed-off-by: Daniel Gomez --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ea479c95..3653591dd 100644 --- a/Makefile +++ b/Makefile @@ -305,7 +305,7 @@ mrproper: $(Q)rm -rf terraform/*/.terraform $(Q)rm -f terraform/*/.terraform.lock.hcl $(Q)rm -f $(KDEVOPS_NODES) - $(Q)rm -f $(ANSIBLE_CFG_INVENTORY) $(KDEVOPS_MRPROPER) + $(Q)rm -f $(ANSIBLE_INVENTORY_FILE) $(KDEVOPS_MRPROPER) $(Q)rm -f .config .config.old extra_vars.yaml $(KCONFIG_YAMLCFG) $(Q)rm -f $(ANSIBLE_CFG_FILE) $(Q)rm -f playbooks/secret.yml $(KDEVOPS_EXTRA_ADDON_DEST) From 629a53d5593883e286ac2d0ebc0f7104207f4d66 Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Mon, 29 Sep 2025 11:39:36 +0200 Subject: [PATCH 4/5] github: configure: fix parallel git-config Fix parallel git-config commands by making them local to the cloned repo in the workflow run. Fixes error: + git config --global --add safe.directory '*' + git config --global user.name kdevops error: could not lock config file /home/gh/.gitconfig: File exists Fixes: 4dd76849 ("github: refactor into reusable actions and workflows") Signed-off-by: Daniel Gomez --- .github/actions/configure/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/configure/action.yml b/.github/actions/configure/action.yml index 2be05313f..68c4e7434 100644 --- a/.github/actions/configure/action.yml +++ b/.github/actions/configure/action.yml @@ -28,9 +28,9 @@ runs: shell: bash run: | set -euxo pipefail - git config --global --add safe.directory '*' - git config --global user.name "kdevops" - git config --global user.email "kdevops@lists.linux.dev" + git config --local --add safe.directory '*' + git config --local user.name "kdevops" + git config --local user.email "kdevops@lists.linux.dev" - name: Make sure our repo kdevops defconfig exists id: defconfig From 85f19852b2a7f2d99e4cae1968b3d304a3efb0d5 Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Mon, 29 Sep 2025 11:43:16 +0200 Subject: [PATCH 5/5] github: kdevops: fix checkout for branch push events For push events, checkout the branch head instead of specific SHA Signed-off-by: Daniel Gomez --- .github/workflows/kdevops.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kdevops.yml b/.github/workflows/kdevops.yml index e5bb61b6c..78a3fe228 100644 --- a/.github/workflows/kdevops.yml +++ b/.github/workflows/kdevops.yml @@ -205,7 +205,8 @@ jobs: git fetch --depth=1 origin refs/pull/${{ github.event.number }}/head:pr-branch git checkout pr-branch else - git checkout ${{ github.sha }} + git fetch --depth=1 origin ${{ github.ref }} + git checkout FETCH_HEAD fi - name: Report kdevops commit information