Skip to content

Conversation

@hrenard
Copy link
Contributor

@hrenard hrenard commented Feb 9, 2021

Related to #43.
This add the possibility to remove the --force tag during galaxy install. The end goal is to allow caching of galaxy packages.

main.go Outdated
Usage: "prepend paths to module library",
EnvVar: "PLUGIN_MODULE_PATH",
},
cli.BoolFlag{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-		cli.BoolFlag{
- 			Name:   "no-galaxy-force",
-			Usage:  "don't force overwriting an existing role or collection",
-			EnvVar: "NO_GALAXY_FORCE",
+		cli.BoolTFlag{
+ 			Name:   "galaxy-force",
+			Usage:  "don't force overwriting an existing role or collection",
+			EnvVar: "PLUGIN_GALAXY_FORCE",

main.go Outdated
Tags: c.String("tags"),
ExtraVars: c.StringSlice("extra-vars"),
ModulePath: c.StringSlice("module-path"),
NoGalaxyForce: c.Bool("no-galaxy-force"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GalaxyForce and galaxy-force

plugin.go Outdated
Tags string
ExtraVars []string
ModulePath []string
NoGalaxyForce bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

plugin.go Outdated
"--force",
}

if p.Config.NoGalaxyForce == false {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@hrenard
Copy link
Contributor Author

hrenard commented Feb 10, 2021

I forgot the PLUGIN_.
But are you sure about the no ? I had the feeling it was impossible to have boolean flag defaulting to true. The negation is to keep the current behavior by default.

@tboerger
Copy link
Contributor

BoolTFlag defaults to true.

@hrenard
Copy link
Contributor Author

hrenard commented Feb 10, 2021

My bad. I fixed it.

@hrenard
Copy link
Contributor Author

hrenard commented Feb 10, 2021

The CI reached docker hub pull rate limit but it should be fine now (11h later). If someone with the appropriate permissions could restart the build to get this merged.

@techknowlogick
Copy link
Contributor

CI fail is fine as like you said it is due to docker hub rate limits, the other tests pass. Although if you want to trigger a build you could send an empty commit.

@tboerger tboerger merged commit e03af11 into drone-plugins:master Feb 12, 2021
@tboerger
Copy link
Contributor

Thanks for you effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants