In the realm of industrial software development, DevOps has emerged as the preferred approach for handling the highly iterative software production process. DevOps refers to the tight integration of development and operations activities, with Continuous Integration, Continuous Delivery, and Continuous Deployment (CI/CD) being pivotal methodologies for ensuring iteratively delivering of high-quality software. To achieve CI/CD, pipelines of activities are deployed using commercial tools. Due to the dynamic nature of these tools, CI/CD pipelines must be constantly migrated to new versions or even new tools. Since this is mostly a manual process, it is a cumbersome and error-prone activity. To assist software engineers during this process, we propose a novel approach that leverages model-driven engineering (MDE) to support the migration of CI/CD pipelines. Our approach is inspired by the traditional reengineering horseshoe model, which abstracts existing pipeline artifacts into a comprehensive model as an intermediate representation. From these models, we can then generate semantic-equivalent pipelines for any novel CI/CD tool. Thus, our main contribution comprises a metamodel designed to represent the structure of existing CI/CD pipelines, and building the foundation for MDE-based migration of CI/CD pipelines. We validated our metamodel by modeling 400 existing pipelines, achieving a 100% success rate in applicability. Fur- thermore, we conducted a detailed case study demonstrating the practical applicability of our model-driven approach in real- world migration scenarios. Finally, we demonstrate that our metamodel promotes equivalence between an original pipeline and a new one generated from it in a different technology by showing through test cases that the execution traces of both pipelines are identical.