| 1234567891011121314151617181920212223242526 |
- // file -> Map
- def read(String filePath) {
- def pipelineCfg = readYaml(file: filePath)
- return pipelineCfg
- }
- // 用project 覆盖 global
- def merge(Object project, Object global) {
- global.k3s = global.k3s + (project.k3s == null ? [:] : project.k3s)
- global.docker = global.docker + (project.docker == null ? [:] : project.docker)
- global.git = (global.git == null ? [:] : global.git) + (project.git == null ? [:] : project.git)
- global.service = project.service
- global.skywalking = project.skywalking
- if (project.ssh != null) {
- global.ssh = project.ssh
- }
- if (project.files != null) {
- global.files = project.files
- }
-
- return global
- }
- return this
|