You've already forked ansible-role-common
refactor distro substitution to function
This commit is contained in:
@@ -47,8 +47,8 @@ local test_distro(distribution) =
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
local gen_pipeline(distro) =
|
local gen_pipeline() =
|
||||||
{kind: 'pipeline',
|
[{kind: 'pipeline',
|
||||||
type: 'docker',
|
type: 'docker',
|
||||||
name: 'Test on %(distro)s' % { distro: distro },
|
name: 'Test on %(distro)s' % { distro: distro },
|
||||||
steps:
|
steps:
|
||||||
@@ -61,17 +61,15 @@ local gen_pipeline(distro) =
|
|||||||
temp: {},
|
temp: {},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
}
|
||||||
|
for distro in distros];
|
||||||
|
|
||||||
// Generate the output
|
// Generate the output
|
||||||
[
|
[
|
||||||
[
|
|
||||||
gen_pipeline(distro)
|
|
||||||
for distro in distros
|
|
||||||
],
|
|
||||||
{kind: 'pipeline',
|
{kind: 'pipeline',
|
||||||
name: 'Send notification by email',
|
name: 'Send notification by email',
|
||||||
steps: email_notification(),
|
steps: email_notification(),
|
||||||
depends_on: distros
|
depends_on: distros
|
||||||
}
|
},
|
||||||
|
gen_pipeline()
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user