diff --git a/cmd/drone-docker/main.go b/cmd/drone-docker/main.go index 4e3d9e8..0409b53 100644 --- a/cmd/drone-docker/main.go +++ b/cmd/drone-docker/main.go @@ -287,6 +287,7 @@ func main() { cli.StringFlag{ Name: "plugin-config", Usage: "path to the plugin config.json. Defaults to config.json", + Value: "config.json", EnvVar: "PLUGIN_PLUGIN_CONFIG", }, } @@ -334,7 +335,7 @@ func run(c *cli.Context) error { Quiet: c.Bool("quiet"), Platform: c.String("platform"), SSHAgentKey: c.String("ssh-agent-key"), - IsPlugin: c.Bool("is-plugin"), + IsPlugin: true, //c.Bool("is-plugin"), PluginConfig: c.String("plugin-config"), }, Daemon: docker.Daemon{ diff --git a/docker.go b/docker.go index e15ede6..90e5cbc 100644 --- a/docker.go +++ b/docker.go @@ -199,11 +199,7 @@ func (p Plugin) Exec() error { cmds = append(cmds, exec.Command(dockerExe, "save", "-o", "tmp.tar", p.Build.Name)) cmds = append(cmds, exec.Command(dockerExe, "image", "rm", p.Build.Name)) cmds = append(cmds, exec.Command("tar", "x", "-C", "plugin/rootfs", "-f", "tmp.tar")) - var pluginConfig string = p.Build.PluginConfig - if len(pluginConfig) == 0 { - pluginConfig = "config.json" - } - cmds = append(cmds, exec.Command("cp", pluginConfig, "plugin/config.json")) + cmds = append(cmds, exec.Command("cp", p.Build.PluginConfig, "plugin/config.json")) cmds = append(cmds, exec.Command(dockerExe, "plugin", "create", p.Build.Repo, "plugin")) }