I have a lot of projects in different repositories which share the same fundamental CI-workflow, which I can easily express as a Declarative Pipeline:
pipeline {
While the views are left intact using the suggestion from noober01 the declarative pipeline will not function properly. E.g. when clauses will be ignored, since the pipeline element is expected to be top-level, meaning it is parsed as scripted pipeline instead.
See the following issue rejected by the team behind Jenkins: loading external declarative pipelines issue