The Messenger of Allah ﷺ said in his sermon, "Honor the alliances made in the days of ignorance, for Islam only increases them in strength. But do not form new alliances in Islam."
حدثنا حميد بن مسعدة حدثنا يزيد بن زريع حدثنا حسين المعلم
أن رسول الله ﷺ قال في خطبته أوفوا بحلف الجاهلية فإنه لا يزيده يعني الإسلام إلا شدة ولا تحدثوا حلفا في الإسلام
[Its chain is hasan]. Ahmad narrated it in 2/212, 213 from the hadith of Husayn Muallim with the same wording, and this is a portion of a longer hadith which Ahmad narrated in 22/179, 180, 182, 184, 187, 189, 191, 192, 194, 207, 211, 212, and others.And on this subject there are reports from Abdul-Rahman bin Awf [Ahmad 1/193, and Bukhari in Adab al-Mufrad, no. 567, and Ibn Hibban, no. 2062, and Hakim 2/219, 190, 193, 220], and Umm Salama [Abu Yaala 12/330, no. 6902], and Jubayr bin Mutim [Muslim, no. 2530], and Abu Hurairah [Ibn Hibban, no. 2063, and Bayhaqi 6/366], and Ibn Abbas [Ibn Hibban, no. 2061, and Tabarani in Kabir 11/281, no. 11740], and Qays bin Asim [Ahmad 5/61].