-
Notifications
You must be signed in to change notification settings - Fork 17
(SDI-2052) add task for metadata generation for plugins #26
Conversation
def self.org_capitalize(word) | ||
{ | ||
'intelsdi-x': 'Intel', | ||
'raintank': 'Raintank', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raintank as a company is lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed them from this list.
@@ -3,3 +3,6 @@ git_base: 'git@github.com:' | |||
namespace: intelsdi-x | |||
branch: pluginsync | |||
message: "Updates to repository from pluginsync utility" | |||
plugins.yml: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool 👌
@@ -0,0 +1,37 @@ | |||
# Plugin Catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resulting file in the Snap repo is PLUGIN_CATALOG.md
. Would make more sense for this name to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
downloads += ["[release](#{p['github_release']})"] if p.include? "github_release" | ||
downloads += p["download"]["s3_latest"].collect{|h| "[#{h.keys.first}](#{h[h.keys.first]})" } if p["download"] and p["download"]["s3_latest"] | ||
-%> | ||
| [<%= p["name"] %>](<%= p['repo_url'] %>) | <%= maintainer %> | <%= p["description"] %> | <%= Pluginsync::Util.html_list(p["badge"]) -%> | <%= Pluginsync::Util.html_list(downloads) %> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working on intelsdi-x/snap#1231, I liked @IRCody's idea to link to the maintainer. Could we swap that in? Thinking:
<%= maintainer %>](<%= p['html_url'] %>
<< I think it's html_url
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor edits but overall awesome. I've run through the plugin methods.
Add PLUGINS_CATALOG to the template. * Use github api to fetch plugins.yml * Retrieve each repo github metadata * Retrieve each repo .sync.yml and metadata.yml * Fetch github issues tagged wish-list * Generate PLUGINS_CATALOG from template
bba77a4
to
78a71ca
Compare
This creates a fork and updates documentation, and generates a pr against the upstream repository.
@mjbrender: Can you review @nanliu's updates and see if they're good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a global point of view, code looks good. As I'm not super familiar with Ruby I there are low level syntax mistakes.
namespace :notify do | ||
desc "send a slack notification" | ||
task :slack do | ||
Pluginsync::Notify::Slack.message "#build-snap", "Snap packages version <https://packagecloud.io/nanliu/snap|#{@snap.pkgversion} now available.>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is {@snap.pkgversion}
defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks related to the bottom of deps.sh
, but I have no freaking clue how yet 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this needs to be fixed, since it's originally for package releases.
end | ||
|
||
def plugin_name | ||
@name.match(/snap-plugin-(collector|processor|publisher)-(.*)$/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to work with kubesnap plugins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kindermoumoute nope - kubesnap project will merge into snap plugins in the longer run.
@nanliu so, I broke this by changing the labeling strategy for the wish list. They're now three separate ones:
The bad is it breaks plugins.rb behavior at the moment. The benefit is you can tag the plugin type in the resulting JSON. I tested all plugin:* commands other than the pull_request one for now. @IRCody code review is 👎 because of that. |
@mjbrender, I added plugin type support for wishlist to the PR. |
LGTM @nanliu 👌! Thanks. |
Add PLUGINS_CATALOG to the template.