--- /dev/null
+---
+fixes:
+ - |
+ Fix update cloud image list job to handle newlines correctly and update
+ an existing gerrit change request.
+
+ A gerrit change submitted through git-review checks for an existing
+ change-id on Gerrit and either updates the patchset or creates a new one.
+ For this to work correctly the change-id should go into the commit footer
+ and not in the GERRIT_COMMIT_MESSAGE. The embedded newlines are not
+ processed correctly in the script and fails to separate the footer and the
+ GERRIT_COMMIT_MESSAGE, instead it creates a new patches everytime rather
+ than updating an existing one.
+
+ The change is tested now existing CR's are updated rather than pushing a
+ new CR everytime.
+
+ https://git.opendaylight.org/gerrit/c/releng/builder/+/89136
# If available, add change_id to commit message
if change_id=$(echo "$query_result" | grep 'Change-Id:' | awk '{print $2}'); then
echo "NOTE: Found gerrit review: $change_id"
- message="Job: $job\nChange-Id: $change_id"
+ message="Job: $job"$'\n\n'"Change-Id: $change_id"
else
echo "NOTE: No gerrit review found"
message="Job: $job"