Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding support for os/arch agnostic manifest url for plugin install #193

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

GabhenDM
Copy link
Contributor

Closes #172

This PR aims to introduce support for os/architecture agnostic manifest URL for plugin installation. It will utilize the GOOS and GOARCH variables in order to find the correspondent URL in order to download the plugin.

It also utilizes the Content-Type from the response in order to identify if it's a manifest file or an actual binary. Also added a validation to avoid infinite recursive calls.

Unsure if this implementation works with plugin bundle install, but believe it would.

Added a single unit test for a plugin install utilizing manifest file, feel free to suggest new cases to test, wanted to get a first input beforehand :)

Copy link
Contributor

@tcarreira tcarreira left a comment

Choose a reason for hiding this comment

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

Almost perfect. Some minor details and it's good to go.
Good job 👍

tsuru/client/plugin.go Outdated Show resolved Hide resolved
tsuru/client/plugin_test.go Outdated Show resolved Hide resolved
tsuru/client/plugin_test.go Outdated Show resolved Hide resolved
@tcarreira tcarreira self-requested a review November 1, 2022 17:24
@GabhenDM GabhenDM force-pushed the add-plugin-manifest-install branch from 98bc890 to 32e992d Compare November 1, 2022 17:29
@GabhenDM GabhenDM force-pushed the add-plugin-manifest-install branch from 32e992d to 4fb0d23 Compare November 1, 2022 21:28
@tcarreira tcarreira merged commit e0a0129 into tsuru:master Nov 1, 2022
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.

Suport generic url for installing a tsuru-plugin
2 participants