You've already forked ansible-role-common
JSONNET updated
This commit is contained in:
@@ -1,21 +1,19 @@
|
|||||||
local distros = ['centos7',
|
// Distros to Test on ;)
|
||||||
|
local distros = ['centos7',
|
||||||
|
'centos8',
|
||||||
'debian10',
|
'debian10',
|
||||||
'debian11'];
|
'debian11'];
|
||||||
|
|
||||||
|
|
||||||
|
/* Configuration of DIND */
|
||||||
local docker_service() =
|
local docker_service() =
|
||||||
{
|
{
|
||||||
name: 'docker',
|
name: 'docker',
|
||||||
image: 'docker:dind',
|
image: 'docker:dind',
|
||||||
privileged: true,
|
privileged: true,
|
||||||
volumes: { name: 'dockersock', path: '/var/run' },
|
volumes: [{ name: 'dockersock', path: '/var/run' },],
|
||||||
};
|
};
|
||||||
|
|
||||||
local pipeline(distribution) = {
|
|
||||||
kind: "pipeline",
|
|
||||||
type: "docker",
|
|
||||||
name: "%(distribution)" % { distribution: distribution }
|
|
||||||
};
|
|
||||||
|
|
||||||
local email_notification() =
|
local email_notification() =
|
||||||
{
|
{
|
||||||
name: 'notify by email',
|
name: 'notify by email',
|
||||||
@@ -35,7 +33,7 @@ local email_notification() =
|
|||||||
local test_distro(distribution) =
|
local test_distro(distribution) =
|
||||||
{
|
{
|
||||||
name: 'Test on %(distribution)s' % { distribution: distribution },
|
name: 'Test on %(distribution)s' % { distribution: distribution },
|
||||||
volumes: { name: 'dockersock', path: '/var/run' },
|
volumes: [{ name: 'dockersock', path: '/var/run' },],
|
||||||
image: 'guisea/ansible-molecule:latest',
|
image: 'guisea/ansible-molecule:latest',
|
||||||
commands: [
|
commands: [
|
||||||
'sleep 10', // give docker enough time to start
|
'sleep 10', // give docker enough time to start
|
||||||
@@ -49,29 +47,25 @@ local test_distro(distribution) =
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
local gen_pipeline() =
|
local gen_pipeline(distro) =
|
||||||
[{kind: 'pipeline',
|
{kind: 'pipeline',
|
||||||
type: 'docker',
|
type: 'docker',
|
||||||
name: 'Test on %(distro)s' % { distro: distro },
|
name: 'Test on %(distro)s' % { distro: distro },
|
||||||
steps: [
|
steps: [
|
||||||
[test_distro('centos7'),
|
test_distro(distro),
|
||||||
email_notification()],
|
email_notification()],
|
||||||
[test_distro('debian10'),
|
|
||||||
email_notification()],
|
|
||||||
[test_distro('debian11'),
|
|
||||||
email_notification()],
|
|
||||||
],
|
|
||||||
services: [
|
services: [
|
||||||
docker_service(),
|
docker_service(),
|
||||||
],
|
],
|
||||||
volumes:
|
volumes:
|
||||||
{
|
[{
|
||||||
name: 'dockersock',
|
name: 'dockersock',
|
||||||
temp: {},
|
temp: {},
|
||||||
},
|
},],
|
||||||
}
|
};
|
||||||
for distro in distros];
|
|
||||||
|
|
||||||
|
// Generate the output
|
||||||
[
|
[
|
||||||
gen_pipeline(),
|
gen_pipeline(distro)
|
||||||
]
|
for distro in distros
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user