Add drone CI starlark file

This commit is contained in:
Joel Linn 2021-09-27 14:41:04 +02:00 committed by Rick Gibbed
parent 019ecaa181
commit dac036a160

36
.drone.star Normal file
View File

@ -0,0 +1,36 @@
# Automatically builds docker images and pushes them to the registry.
# Required drone secrets:
# - docker_repo eg. 'xeniaproject/buildenv'
# - docker_username user with write permissions to repo
# - docker_password password of the user
def main(ctx):
return [
pipeline('2021-05-05'),
pipeline('2021-06-21'),
pipeline('2021-09-29'),
]
def pipeline(tag):
return {
'kind': 'pipeline',
'type': 'docker',
'name': tag,
'steps': [
{
'name': 'docker',
'image': 'plugins/docker',
'settings': {
'dockerfile': 'Dockerfile.' + tag,
'tags': [tag],
'repo': {'from_secret': 'docker_repo'},
'username': {'from_secret': 'docker_username'},
'password': {'from_secret': 'docker_password'},
},
},
],
'trigger': {
'branch': ['master'],
'event': ['push']
},
}