With CI, I wonder if someone could build a tool which had some sort of DSL to define your CI pipeline, and then translated that to configuration files for multiple CI providers (Travis CI, CircleCI, GitHub Actions, Jenkins, etc.) If you write all your CI pipelines in that DSL, then moving to another provider would be just telling the tool to generate output for another backend.
(One issue is that such a DSL could only provide lowest common denominator functionality... or else, suppose CI providers 1 and 2 offer feature X but 3 and 4 don't, then if you use feature X, you can switch between 1 and 2, but the tool would give an "unsupported feature" error if you tried to generate output for 3 or 4.)