diff --git a/main.go b/main.go index ecd63b7..cd28a78 100644 --- a/main.go +++ b/main.go @@ -193,6 +193,7 @@ var ( ref = compile.Flag("git-ref", "git commit ref").PlaceHolder("refs/heads/master").String() sha = compile.Flag("git-sha", "git commit sha").String() creds = compile.Flag("git-creds", "git credentials").URLList() + cron = compile.Flag("cron", "cron job name").String() instance = compile.Flag("instance", "drone instance hostname").PlaceHolder("drone.company.com").String() deploy = compile.Flag("deploy-to", "target deployment").PlaceHolder("production").String() secrets = compile.Flag("secret", "secret variable").StringMap() @@ -256,6 +257,7 @@ func runCompile() error { comp.SkipFunc = compiler.SkipFunc( compiler.SkipData{ Branch: *branch, + Cron: *cron, Event: *event, Instance: *instance, Ref: *ref, diff --git a/yaml/converter/legacy/internal/config.go b/yaml/converter/legacy/internal/config.go index 0b6c774..501e53a 100644 --- a/yaml/converter/legacy/internal/config.go +++ b/yaml/converter/legacy/internal/config.go @@ -261,7 +261,7 @@ func toPullPolicy(pull bool) string { case true: return "always" default: - return "default" + return "if-not-exists" } }