Fan out/Fan In

This commit is contained in:
2022-03-15 07:14:13 +13:00
parent fd75e6421c
commit e565652503

View File

@@ -17,7 +17,6 @@ local docker_service() =
local email_notification() =
{
name: 'notify by email',
image: 'drillster/drone-email',
settings:
{ host: 'mail.guise.net.nz',
@@ -28,7 +27,7 @@ local email_notification() =
from: 'drone@guise.net.nz'
},
when:
{ status: [ 'changed', 'failure' ] },
{ status: [ 'success', 'failure' ] },
};
local test_distro(distribution) =
@@ -52,21 +51,27 @@ local gen_pipeline(distro) =
{kind: 'pipeline',
type: 'docker',
name: 'Test on %(distro)s' % { distro: distro },
steps: [
steps:
test_distro(distro),
email_notification()],
services: [
services:
docker_service(),
],
volumes:
[{
name: 'dockersock',
temp: {},
},],
},
],
};
// Generate the output
[
[
gen_pipeline(distro)
for distro in distros
for distro in distros
],
{kind: 'pipeline',
name: 'Send notification by email',
steps: email_notification(),
depends_on: distros
}
]