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 diff --git a/.github/workflows/kdevops.yml b/.github/workflows/kdevops.yml index 60754ba75..78a3fe228 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() && @@ -200,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 @@ -258,7 +264,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 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) 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: