-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.star
37 lines (35 loc) · 1.06 KB
/
.drone.star
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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('2022-01-01'),
pipeline('2022-07-15'),
]
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']
},
}