tools/logstash-docgen/README.md
Features
You can now generate the documentation for a Logstash distribution.
prerequisite:
bin/logstash-plugin --no-verify --developmentIf you have all of the above you can run this command:
rake doc:generate-plugins
rake doc:generate-plugins[/tmp/the-new-doc] # Depending on the shell you are using you might need to quote the task name, like this rake "doc:generate-plugins[/tmp/new-doc]"
This will give you a output similar to this
logstash-input-file > SUCCESS
logstash-input-s3 > SUCCESS
logstash-input-kafka > FAIL
[...]
Exceptions: XXXX
The generator will try to generate the doc for all the plugins defined in the Gemfile and installed in Logstash, if anything goes wrong it won't stop the generation of the other plugin. The Task will also report any errors with stacktraces at the end, if one plugin fail the build, you can interrupt the process and it will output the current errors before exiting.
You can now generate the documentation from main for all the plugin in the logstash-plugins organization.
prerequisite
tools/logstash-docgen directoryTo get started you can run the following commands:
cd tools/logstash-docgen
bundle install
You can use the bin/logstash-docgen command to generate any plugin that you want, this executable can generate all the plugins or specific one from their main branch.
Usages:
bin/logstash-docgen --all # will generate the doc for all the plugins
bin/logstash-docgen logstash-input-file logstash-input-s3 # generate doc for 2 plugins
See: bin/logstash-docgen --help for complete usage.
Notes:
logstash-docgen.yml for details.prerequisite
logstash-docgen as development dependencyrequire "logstash/docgen/plugin_doc" to the Rakefilebundle installAfter you can have access to a few rake tasks, you can list them with bundle exec rake -T
bundle exec rake doc:asciidoc # return the raw asciidoc
bundle exec rake doc:html # Give you the raw html
The CI can use the ci/docs.sh script to correctly bootstrap and execute the docgeneration