Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pluginmanager/prepare_offline_pack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def validate_arguments!

Examples:
bin/logstash-plugin prepare-offline-pack logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-jdbc logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-kv logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-*
bin/logstash-plugin prepare-offline-pack logstash-filter-* logstash-input-beats

Expand Down
22 changes: 21 additions & 1 deletion qa/integration/specs/cli/prepare_offline_pack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@
end
end

context "creating a pack for integration plugins" do
let(:plugin_to_pack) { "logstash-integration-jdbc" }


it "successfully create a pack" do
execute = @logstash_plugin.prepare_offline_pack(plugin_to_pack, temporary_zip_file)

expect(execute.exit_code).to eq(0)
expect(execute.stderr_and_stdout).to match(/Offline package created at/)
expect(execute.stderr_and_stdout).to match(/#{temporary_zip_file}/)

unpacked = unpack(temporary_zip_file)
expect(unpacked.plugins.collect(&:name)).to include(plugin_to_pack)
expect(unpacked.plugins.size).to eq(1)

expect(unpacked.dependencies.size).to be > 0
end
end


context "create a pack from a wildcard" do
let(:plugins_to_pack) { %w(logstash-filter-*) }

Expand All @@ -50,7 +70,7 @@
filters = @logstash_plugin.list(plugins_to_pack.first)
.stderr_and_stdout.split("\n")
.delete_if do |line|
line =~ /cext|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
line =~ /cext|├──|└──|logstash-integration|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
end

expect(unpacked.plugins.collect(&:name)).to include(*filters)
Expand Down
16 changes: 10 additions & 6 deletions rakelib/plugins-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@
"skip-list": true
},
"logstash-filter-jdbc_static": {
"default-plugins": true,
"skip-list": false
"default-plugins": false,
"skip-list": true
},
"logstash-filter-jdbc_streaming": {
"default-plugins": true,
"skip-list": false
"default-plugins": false,
"skip-list": true
},
"logstash-filter-json": {
"default-plugins": true,
Expand Down Expand Up @@ -317,8 +317,8 @@
"skip-list": true
},
"logstash-input-jdbc": {
"default-plugins": true,
"skip-list": false
"default-plugins": false,
"skip-list": true
},
"logstash-input-jms": {
"default-plugins": true,
Expand Down Expand Up @@ -402,6 +402,10 @@
"default-plugins": true,
"skip-list": false
},
"logstash-integration-jdbc": {
"default-plugins": true,
"skip-list": false
},
"logstash-integration-kafka": {
"default-plugins": true,
"skip-list": false
Expand Down