-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathriji.rhai
61 lines (50 loc) · 917 Bytes
/
riji.rhai
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
59
60
61
fn help() {
print([
"- build <ci|build|release>",
"- run <ci|build|release>",
"- push <ci|build|release>"
]);
}
fn _name_from_tag(tag) {
return "chuchi-" + tag;
}
fn build() {
print("build <ci|build|release>");
}
// tag: build | release
fn build(tag) {
tag = _name_from_tag(tag);
let build = cmd([
"docker", "build", "-t", "soerenmeier/" + tag, tag, "--pull"
]);
build.execute();
}
fn run() {
print("run <ci|build|release>");
}
// run interactive
fn run(tag) {
tag = _name_from_tag(tag);
let run = cmd([
"docker", "run", "--rm", "-it", "soerenmeier/" + tag
]);
run.execute();
}
fn push() {
print("push <ci|build|release>");
}
fn push(tag) {
tag = _name_from_tag(tag);
let push = cmd([
"docker", "push", "soerenmeier/" + tag + ":latest"
]);
push.execute();
}
fn publish_all() {
build("ci");
push("ci");
build("build");
push("build");
build("release");
push("release");
}