JSONNET updated

This commit is contained in:
2022-03-14 14:58:20 +13:00
parent cc436f4fb1
commit da6c85c5b1

View File

@@ -1,19 +1,17 @@
// Distros to Test on ;)
local distros = ['centos7',
'centos8',
'debian10',
'debian11'];
/* Configuration of DIND */
local docker_service() =
{
name: 'docker',
image: 'docker:dind',
privileged: true,
volumes: { name: 'dockersock', path: '/var/run' },
};
local pipeline(distribution) = {
kind: "pipeline",
type: "docker",
name: "%(distribution)" % { distribution: distribution }
volumes: [{ name: 'dockersock', path: '/var/run' },],
};
local email_notification() =
@@ -35,7 +33,7 @@ local email_notification() =
local test_distro(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',
commands: [
'sleep 10', // give docker enough time to start
@@ -49,29 +47,25 @@ local test_distro(distribution) =
},
};
local gen_pipeline() =
[{kind: 'pipeline',
local gen_pipeline(distro) =
{kind: 'pipeline',
type: 'docker',
name: 'Test on %(distro)s' % { distro: distro },
steps: [
[test_distro('centos7'),
test_distro(distro),
email_notification()],
[test_distro('debian10'),
email_notification()],
[test_distro('debian11'),
email_notification()],
],
services: [
docker_service(),
],
volumes:
{
[{
name: 'dockersock',
temp: {},
},
}
for distro in distros];
},],
};
// Generate the output
[
gen_pipeline(),
gen_pipeline(distro)
for distro in distros
]