You've already forked ansible-role-common
Fan out/Fan In
This commit is contained in:
@@ -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
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user