Bara bin Azib reported,

I saw the Prophet ﷺ on the day of the Trench carrying dirt until the dirt covered the hair of his chest. He was a man with thick hair, and he was chanting the verses of Abdullah,"O Allah, were it not for You, we would not have been guided, nor given charity, nor prayed. So send down tranquility upon us, and make our feet firm if we meet the enemy. Indeed, the enemies have transgressed against us, when they intend strife, we refuse."He raised his voice with these words.

Bukhari 3034

Sahih

حدثنا مسدد حدثنا أبو الأحوص حدثنا أبو إسحاق

عن البراء رضي الله عنه قال

رأيت النبي ﷺ يوم الخندق وهو ينقل التراب حتى وارى التراب شعر صدره وكان رجلا كثير الشعر وهو يرتجز برجز عبد الله اللهم لولا أنت ما اهتدينا ولا تصدقنا ولا صلينا فأنزلن سكينة علينا وثبت الأقدام إن لاقينا إن الأعداء قد بغوا علينا إذا أرادوا فتنة أبينا يرفع بها صوته

البخاري 3034صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
Rajaz poetry in war and raising the voice while digging the trench
Numbering
Darussalam 3034
Bukhari 3034