19 Commits

Author SHA1 Message Date
10f03a610b Try triggers
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:18:25 +13:00
5203103900 Cloning disable jsonnet style
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:11:33 +13:00
57ab370f92 Stop cloning for notify steps
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:09:27 +13:00
0a1f4323a3 Image goes on steps (doh)
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:05:31 +13:00
f6713ff240 Add image
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:03:52 +13:00
1ef3ba3ca9 Fix permissions
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:01:57 +13:00
568b6fb667 Ordering fix
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 16:00:39 +13:00
22d502de50 Update jsonnet
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:59:12 +13:00
b11417540b Add notification on tag
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 15:47:23 +13:00
bece894b0d Fix escape sequence
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 15:44:46 +13:00
e43f9e0efa add missing comma
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:43:55 +13:00
f19de75deb fix function
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:43:20 +13:00
0c86143b56 Add pipeline for package release
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:42:34 +13:00
c85320a15c Add pipeline for releasing from tag
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:40:29 +13:00
50f0da12d8 damn jsonnet
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 15:21:40 +13:00
4b367f73a2 Update pipeline
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:20:00 +13:00
55e2036835 Updated pipeline
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:18:36 +13:00
cdfd7e6193 Remove centos8
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:12:41 +13:00
2cba945d2f [CI SKIP] Exclude tag 2022-11-02 15:00:12 +13:00

View File

@@ -1,6 +1,5 @@
// Distros to Test on ;)
local distros = ['centos7',
'centos8',
'rockylinux8',
'debian10',
'debian11'];
@@ -60,23 +59,78 @@ local gen_pipeline(distro) =
name: 'dockersock',
temp: {},
},],
when:
{ event: {exclude: ['tag']},
},
};
local gen_release() =
{kind: 'pipeline',
type: 'docker',
image: 'guisea/ansible-molecule:alpine-latest',
name: 'Generate Release',
commands: [
'sleep 10', // give docker enough time to start
'mkdir ${DRONE_REPO_NAME}',
'rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}',
'cd ${DRONE_REPO_NAME}',
'tar -czf ../${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz ./*', // Create an archive of the role
'curl --user ${GITEA_USER}:${GITEA_TOKEN} --upload-file ../${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz https://${GITEA_URL}/api/packages/${GITEA_REPOUSER}/generic/ansible-role-common/${DRONE_TAG}/${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz',
],
when:
{ event: {include: ['tag']},
},
trigger:
{ event: {include: ['tag'],},},
};
local gen_pipeline_release() =
{kind: 'pipeline',
type: 'docker',
name: 'Generate release from tag',
steps:
[gen_release()],
when:
{ event: {include: ['tag']},
},
trigger:
{ event: {include: ['tag'],},},
};
// Generate the output
[
gen_pipeline('centos7'),
gen_pipeline('centos8'),
gen_pipeline('rockylinux8'),
gen_pipeline('debian10'),
gen_pipeline('debian11'),
{kind: 'pipeline',
type: 'docker',
name: 'Notify',
name: 'Notify normal',
clone: {disable: true},
steps: [email_notification()],
trigger:
{ event: {exclude: ['tag'],},},
when:
{ status: [ 'success', 'failure' ] },
{ status: [ 'success', 'failure' ] ,
event: {exclude: ['tag']},
},
depends_on:
['Test on %(distro)s' % { distro: distro }
for distro in distros]
}
},
gen_pipeline_release(),
{kind: 'pipeline',
type: 'docker',
clone: {disable: true},
name: 'Notify Tagged release',
steps: [email_notification()],
trigger:
{ event: {include: ['tag'],},},
when:
{ status: [ 'success', 'failure' ] ,
event: {include: ['tag']},
},
depends_on:
['Generate release from tag']
},
]