-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.star
59 lines (57 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
def main(ctx):
return [
step("1.20.6"),
step("1.21.1", ["latest"]),
]
def step(mcver,tags=[],jre="21"):
return {
"kind": "pipeline",
"name": "build-%s" % mcver,
"steps": [
{
"name": "build",
"image": "spritsail/docker-build",
"pull": "always",
"settings": {
"repo": "minecraft-dev-%s" % mcver,
"build_args": [
"MC_VER=%s" % mcver,
"JRE_VER=%s" % jre,
],
},
},
{
"name": "test",
"image": "spritsail/docker-test",
"pull": "always",
"settings": {
"repo": "minecraft-dev-%s" % mcver,
"exec_pre": "echo eula=true > eula.txt",
"log_pipe": "grep -qm 1 \\'Done ([0-9]\\\\+\\\\.[0-9]\\\\+s)\\\\!\\'",
"timeout": 600,
},
},
{
"name": "publish",
"image": "spritsail/docker-publish",
"pull": "always",
"settings": {
"from": "minecraft-dev-%s" % mcver,
"repo": "spritsail/minecraft",
"tags": [mcver] + tags,
},
"environment": {
"DOCKER_USERNAME": {
"from_secret": "docker_username",
},
"DOCKER_PASSWORD": {
"from_secret": "docker_password",
},
},
"when": {
"branch": ["master"],
"event": ["push"],
},
},
]
}