Segmentation of anatomical structures from Cardiac Magnetic Resonance (CMR) is central to the non-invasive quantitative assessment of cardiac function and structure. Anatomical variability, imaging heterogeneity and cardiac dynamics challenge the automation of this task. Deep learning (DL) approaches have taken over the field of automatic segmentation in recent years, however they are limited by data availability and the additional variability introduced by differences in scanners and protocols. In this work, we propose a 2-step fully automated pipeline to segment CMR images, based on DL encoder-decoder frameworks, and we explore two domain adaptation techniques, domain adversarial training and iterative domain unlearning, to overcome the imaging heterogeneity limitations. We evaluate our methods on the MICCAI 2020 Multi-Centre, Multi-Vendor & Multi-Disease Cardiac Image Segmentation Challenge training and validation datasets. The results show the improvement in performance produced by domain adaptation models, especially among the seen vendors. Finally, we build an ensemble of baseline and domain adapted networks, that reported state-of-art mean Dice scores of 0.912, 0.857 and 0.861 for left ventricle (LV) cavity, LV myocardium and right ventricle cavity, respectively, on the externally validated Challenge dataset, including several unseen vendors, centers and cardiac pathologies.