I always use an etch primer for metal parts.
This is available from any decent motor vehicle paint supplier. It's not terribly expensive, and half a litre will last you a long time.
Once coated with an etch primer, paint will never chip off.
Another tip I got from Dave Merriman, is to dip parts in ferric chloride, this puts millions of tiny microscopic pits into the surface, which gives lots of teeth for ordinary primer to cling to.
I find this technique useful for small parts, but prefer to use etch primer for larger parts.
If you spray the etch primer, use a good mask and/or spray outside. It's particularly nasty stuff, as it contains acid and thus is highly carcinogenic.