-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
flags.go
85 lines (81 loc) · 2.39 KB
/
flags.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
79
80
81
82
83
84
85
package hetznercloud
import (
"os"
"github.com/urfave/cli/v2"
)
const category = "Hetzner Cloud"
var ProviderFlags = []cli.Flag{
&cli.StringFlag{
Name: "hetznercloud-api-token",
Usage: "hetzner cloud api token",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_API_TOKEN"},
FilePath: os.Getenv("WOODPECKER_HETZNERCLOUD_API_TOKEN_FILE"),
Category: category,
},
&cli.StringFlag{
Name: "hetznercloud-location",
Value: "nbg1",
Usage: "hetzner cloud location",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_LOCATION"},
Category: category,
},
&cli.StringFlag{
Name: "hetznercloud-server-type",
Value: "cx11",
Usage: "hetzner cloud server type",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_SERVER_TYPE"},
Category: category,
},
&cli.StringSliceFlag{
Name: "hetznercloud-ssh-keys",
Usage: "names of hetzner cloud ssh keys",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_SSH_KEYS"},
Category: category,
},
&cli.StringFlag{
Name: "hetznercloud-user-data",
Usage: "hetzner cloud userdata template",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_USERDATA"},
FilePath: os.Getenv("WOODPECKER_HETZNERCLOUD_USERDATA_FILE"),
Category: category,
},
&cli.StringFlag{
Name: "hetznercloud-image",
Value: "ubuntu-22.04",
Usage: "hetzner cloud image",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_IMAGE"},
Category: category,
},
&cli.StringSliceFlag{
Name: "hetznercloud-labels",
Usage: "hetzner cloud server labels",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_LABELS"},
Category: category,
},
&cli.StringSliceFlag{
Name: "hetznercloud-firewalls",
Usage: "names of hetzner cloud firewalls",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_FIREWALLS"},
Category: category,
},
&cli.StringSliceFlag{
Name: "hetznercloud-networks",
Usage: "names of hetzner cloud networks",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_NETWORKS"},
Category: category,
},
&cli.BoolFlag{
Name: "hetznercloud-public-ipv4-enable",
Value: true,
Usage: "enables public ipv4 network for agents",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_PUBLIC_IPV4_ENABLE"},
Category: category,
},
&cli.BoolFlag{
Name: "hetznercloud-public-ipv6-enable",
Value: true,
Usage: "enables public ipv6 network for agents",
EnvVars: []string{"WOODPECKER_HETZNERCLOUD_PUBLIC_IPV6_ENABLE"},
Category: category,
},
}