Gauge theory on noncommutative spaces