"'This is what we will do to them: We will let them live, so that God's wrath will not fall on us for breaking the oath we swore to them.' They continued, 'Let them live, but let them be woodcutters and water carriers in the service of the whole assembly.' So the leaders' promise to them was kept." NIV translation
The entire assembly agreed that they had to let the Gibeonites live but they also decided to make them slaves. This might sound good but it was still not in keeping with God's instructions to not make a treaty with the people of the land.
"Then Joshua summoned the Gibeonites and said, 'Why did you deceive us by saying, "We live a long way from you," while actually you live near us? You are now under a curse: You will never be released from service as woodcutters and water carriers for the house of my God.'" NIV translation
Because of their deception, Joshua pronounced a curse of the Gibeonite people. That curse was a partial fulfillment of the prophecy of Noah where he said that Canaan would one day serve Shem. The sacrifices at the tabernacle required a lot of wood for the fires and water for washing.
"They answered Joshua, 'Your servants were clearly told how the Lord your God had commanded his servant Moses to give you the whole land and to wipe out all its inhabitants from before you. So we feared for our lives because of you, and that is why we did this. We are now in your hands. Do to us whatever seems good and right to you.' So Joshua saved them from the Israelites, and they did not kill them. That day he made the Gibeonites woodcutters and water carriers for the assembly, to provide for the needs of the altar of the Lord at the place the Lord would choose. And that is what they are to this day." NIV translation
The Gibeonites had deceived the Israelites in order to save their lives. They accomplished that purpose and willingly submitted to the forced labor.