mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-25 19:20:39 +00:00
fix redefined flags
This commit is contained in:
parent
2496502ff6
commit
41a9f02b92
@ -20,19 +20,6 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
|||||||
EnvVars: []string{"DRONE_REMOTE_URL"},
|
EnvVars: []string{"DRONE_REMOTE_URL"},
|
||||||
Destination: &settings.Build.Remote,
|
Destination: &settings.Build.Remote,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "commit.sha",
|
|
||||||
Usage: "git commit sha",
|
|
||||||
EnvVars: []string{"DRONE_COMMIT_SHA"},
|
|
||||||
Value: "00000000",
|
|
||||||
Destination: &settings.Build.Name,
|
|
||||||
},
|
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "commit.ref",
|
|
||||||
Usage: "git commit ref",
|
|
||||||
EnvVars: []string{"DRONE_COMMIT_REF"},
|
|
||||||
Destination: &settings.Build.Ref,
|
|
||||||
},
|
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.mirror",
|
Name: "daemon.mirror",
|
||||||
Usage: "docker daemon registry mirror",
|
Usage: "docker daemon registry mirror",
|
||||||
@ -233,12 +220,6 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
|||||||
Value: true,
|
Value: true,
|
||||||
Destination: &settings.Cleanup,
|
Destination: &settings.Cleanup,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo.branch",
|
|
||||||
Usage: "repository default branch",
|
|
||||||
EnvVars: []string{"DRONE_REPO_BRANCH"},
|
|
||||||
Destination: &settings.Build.Branch,
|
|
||||||
},
|
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "no-cache",
|
Name: "no-cache",
|
||||||
Usage: "do not use cached intermediate containers",
|
Usage: "do not use cached intermediate containers",
|
||||||
|
@ -74,6 +74,13 @@ type Settings struct {
|
|||||||
|
|
||||||
// Validate handles the settings validation of the plugin.
|
// Validate handles the settings validation of the plugin.
|
||||||
func (p *Plugin) Validate() error {
|
func (p *Plugin) Validate() error {
|
||||||
|
p.settings.Build.Name = "00000000"
|
||||||
|
if p.pipeline.Commit.SHA != "" {
|
||||||
|
p.settings.Build.Name = p.pipeline.Commit.SHA
|
||||||
|
}
|
||||||
|
|
||||||
|
p.settings.Build.Branch = p.pipeline.Repo.Branch
|
||||||
|
p.settings.Build.Ref = p.pipeline.Commit.Ref
|
||||||
p.settings.Daemon.Registry = p.settings.Login.Registry
|
p.settings.Daemon.Registry = p.settings.Login.Registry
|
||||||
|
|
||||||
if p.settings.Build.TagsAuto {
|
if p.settings.Build.TagsAuto {
|
||||||
|
Loading…
Reference in New Issue
Block a user