mirror of
https://github.com/thegeeklab/drone-yaml.git
synced 2024-06-03 08:29:41 +02:00
add repository address to convert command
This commit is contained in:
parent
e8b24d482c
commit
c50000a465
4
main.go
4
main.go
|
@ -46,6 +46,7 @@ var (
|
||||||
convert = kingpin.Command("convert", "convert the yaml file")
|
convert = kingpin.Command("convert", "convert the yaml file")
|
||||||
convertSave = convert.Flag("save", "save result to source").Short('s').Bool()
|
convertSave = convert.Flag("save", "save result to source").Short('s').Bool()
|
||||||
convertFile = convert.Arg("source", "source file location").Default(".drone.yml").File()
|
convertFile = convert.Arg("source", "source file location").Default(".drone.yml").File()
|
||||||
|
convertAddr = convert.Flag("addr", "remote repository address").String()
|
||||||
|
|
||||||
lint = kingpin.Command("lint", "lint the yaml file")
|
lint = kingpin.Command("lint", "lint the yaml file")
|
||||||
lintPriv = lint.Flag("privileged", "privileged mode").Short('p').Bool()
|
lintPriv = lint.Flag("privileged", "privileged mode").Short('p').Bool()
|
||||||
|
@ -107,6 +108,7 @@ func runConvert() error {
|
||||||
}
|
}
|
||||||
m := converter.Metadata{
|
m := converter.Metadata{
|
||||||
Filename: f.Name(),
|
Filename: f.Name(),
|
||||||
|
URL: *convertAddr,
|
||||||
}
|
}
|
||||||
b, err := converter.Convert(d, m)
|
b, err := converter.Convert(d, m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -193,7 +195,7 @@ var (
|
||||||
ref = compile.Flag("git-ref", "git commit ref").PlaceHolder("refs/heads/master").String()
|
ref = compile.Flag("git-ref", "git commit ref").PlaceHolder("refs/heads/master").String()
|
||||||
sha = compile.Flag("git-sha", "git commit sha").String()
|
sha = compile.Flag("git-sha", "git commit sha").String()
|
||||||
creds = compile.Flag("git-creds", "git credentials").URLList()
|
creds = compile.Flag("git-creds", "git credentials").URLList()
|
||||||
cron = compile.Flag("cron", "cron job name").String()
|
cron = compile.Flag("cron", "cron job name").String()
|
||||||
instance = compile.Flag("instance", "drone instance hostname").PlaceHolder("drone.company.com").String()
|
instance = compile.Flag("instance", "drone instance hostname").PlaceHolder("drone.company.com").String()
|
||||||
deploy = compile.Flag("deploy-to", "target deployment").PlaceHolder("production").String()
|
deploy = compile.Flag("deploy-to", "target deployment").PlaceHolder("production").String()
|
||||||
secrets = compile.Flag("secret", "secret variable").StringMap()
|
secrets = compile.Flag("secret", "secret variable").StringMap()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user