We investigate self-contracted curves, arising as (discrete or continuous time) gradient curves of quasi-convex functions, and their rectifiability (finiteness of the lengths) in Euclidean spaces, Hadamard manifolds and CAT(0)-spaces. In the Hadamard case, we give a quantitative refinement of the original proof of the rectifiability of bounded selfcontracted curves (in general Riemannian manifolds) by Daniilidis et al. Our argument leads us to a generalization to CAT(0)-spaces satisfying several uniform estimates on their local structures. Upon these conditions, we show the rectifiability of bounded self-contracted curves in trees, books and CAT(0)-simplicial complexes.