-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-worlds.json
47 lines (47 loc) · 1.87 KB
/
my-worlds.json
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
{
"variables": {
"cwd": "{{env `PWD`}}",
"local-artefact-dir": "CHANGE ME",
"container-dir": "/minecraft",
"user": "minecraft",
"uid": "10000",
"group": "minecraft",
"gid": "10000"
},
"builders": [
{
"type": "docker",
"image": "alpine:3.10",
"pull": false,
"discard": true,
"run_command": [ "-d", "-i", "-t", "{{.Image}}", "/bin/sh" ],
"changes": [
"ENV JAVA_HOME=/usr",
"USER {{user `user`}}"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"apk --no-cache --update upgrade",
"apk --no-cache add ca-certificates openjdk8 maven git bash",
"update-ca-certificates --fresh",
"addgroup -g {{user `gid`}} {{user `group`}} && adduser -u {{user `uid`}} -D -G {{user `group`}} -h {{user `container-dir`}} -s /bin/bash {{user `user`}}",
"#su -c 'git clone https://github.com/bergerhealer/BKCommonLib.git' - {{user `user`}}",
"#su -c 'cd BKCommonLib; mvn install' - {{user `user`}}",
"su -c 'git clone https://github.com/bergerhealer/MyWorlds.git' - {{user `user`}}",
"su -c 'cd MyWorlds; mvn package' - {{user `user`}}",
"#su -c 'tar cvf ~/my-worlds.tar BKCommonLib/target/*.jar MyWorlds/target/*.jar' - {{user `user`}}",
"su -c 'tar cvf ~/my-worlds.tar .m2/repository/com/bergerkiller/bukkit/BKCommonLib/*/BKCommonLib-*.jar MyWorlds/target/*.jar' - {{user `user`}}"
]
},
{
"type": "file",
"direction": "download",
"source": "{{user `container-dir`}}/my-worlds.tar",
"destination": "./{{user `local-artefact-dir`}}/"
}
]
}