Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions playbooks/roles/kdevops_archive/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,15 @@
kdevops_archive_ci_test_result: "unknown"
when: not ci_result_file.stat.exists

- name: Create a temporary file for commit message
ansible.builtin.tempfile:
state: file
suffix: txt
prefix: kdevops_commit_msg_
register: tmp_commit_msg

- name: Set commit message
set_fact:
ansible.builtin.set_fact:
commit_message: |
{{ kdevops_archive_test_trigger }}: {{ kdevops_archive_test_subject }}

Expand All @@ -424,14 +431,25 @@

{{ kdevops_archive_test_commit }}

- name: Copy commit message into temporary file
ansible.builtin.copy:
content: "{{ commit_message }}"
dest: "{{ tmp_commit_msg.path }}"
mode: '0644'

- name: Commit the archive
shell: |
git commit -m "{{ commit_message }}"
ansible.builtin.shell: |
git commit --file "{{ tmp_commit_msg.path }}"
args:
chdir: "{{ kdevops_results_archive_dir }}"
environment:
GIT_LFS_SKIP_SMUDGE: "0"

- name: Remove temporary file with commit message
ansible.builtin.file:
path: "{{ tmp_commit_msg.path }}"
state: absent

- name: Push changes to remote repository
command:
cmd: git push origin main
Expand Down
3 changes: 1 addition & 2 deletions scripts/bringup_guestfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ build_custom_image()
CUSTOM_IMAGE="${CUSTOM_IMAGE_DIR}/${OS_VERSION}.raw"
CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok"
CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf"
CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)"

mkdir -p ${CUSTOM_IMAGE_DIR}
CUSTOM_INDEX="$(realpath ${CUSTOM_IMAGE_DIR}/index)"

if [[ ! -f $CUSTOM_IMAGE && "$CONFIG_GUESTFS_HAS_CUSTOM_RAW_IMAGE_URL" == "y" ]]; then
fetch_custom_image
Expand Down