-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmain.go
78 lines (61 loc) · 1.76 KB
/
main.go
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package main
import (
"log"
"time"
sdk "github.com/gaia-pipeline/gosdk"
)
func CreateUser(args sdk.Arguments) error {
log.Println("CreateUser has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("CreateUser has been finished!")
return nil
}
func MigrateDB(args sdk.Arguments) error {
log.Println("MigrateDB has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("MigrateDB has been finished!")
return nil
}
func CreateNamespace(args sdk.Arguments) error {
log.Println("CreateNamespace has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("CreateNamespace has been finished!")
return nil
}
func CreateDeployment(args sdk.Arguments) error {
log.Println("CreateDeployment has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("CreateDeployment has been finished!")
return nil
}
func CreateService(args sdk.Arguments) error {
log.Println("CreateService has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("CreateService has been finished!")
return nil
}
func CreateIngress(args sdk.Arguments) error {
log.Println("CreateIngress has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("CreateIngress has been finished!")
return nil
}
func Cleanup(args sdk.Arguments) error {
log.Println("Cleanup has been started!")
// lets sleep to simulate that we do something
time.Sleep(5 * time.Second)
log.Println("Cleanup has been finished!")
return nil
}
func main() {
// Serve
if err := sdk.Serve(jobs); err != nil {
panic(err)
}
}