Add fleeting subcommand to manage fleeting plugins
What does this MR do?
Adds a fleeting sub-command to gitlab-runner.
fleeting itself has the following sub-commands:
-
installto install plugins based on the version constraint found withinautoscaler.plugin.-
upgradeargument will upgrade and install later versions matching the provided version constraint.
-
-
listto list already installed plugins and their path. -
loginto store credentials for a registry.
Why was this MR needed?
We needed a way to easily install fleeting plugins.
What's the best way to test this MR?
-
Create
runner-test.toml:[[runners]] name = "runner-test" token = "abcdefghijk" executor = "instance" [runners.autoscaler] plugin = "aws:0.0.0-bleeding" # registry.gitlab.com/gitlab-org/fleeting/plugins/aws:0.0.0-bleeding or gitlab-org/fleeting/plugins/aws will also work. [runners.autoscaler.plugin_config] name = "linux-test" -
Run
gitlab-runner fleeting -c runner-test.toml listand see that the list is empty (no plugin found). -
Run
gitlab-runner fleeting -c runner-test.toml installto install the plugin and have the path reported. -
Run
gitlab-runner fleeting -c runner-test.toml listand confirm a plugin now exists and will be used. -
Run
./gitlab-runner --debug run -c runner-test.tomland confirm that the plugin is being used (plugin: starting plugin: path=)
What are the relevant issue numbers?
Edited by Arran Walker