Plugin Information |
---|
View Cucumber Living Documentation on the plugin site for more information. |
Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:
Since v2.2.1 the plugin doesn't need relaxed content security policy. |
Versions
|
How it works?
The plugin first looks for Cucumber json files, generated by your BDD tests, on your build workspace. After it parses the files and transforms them into html and pdf documentation making them available into your Jenkins build.
To generate Cucumber json output files use the json formatter:
@RunWith(Cucumber.class) @CucumberOptions(plugin ={"json:target/cucumber.json"})
Usage
After installing the plugin, you'll get a new Post build action entry named Living documentation:
Configuration
Here are the possible plugin configuration:
Accessing documentation
When the plugin is enabled in your job it adds a link which will take you to the current project documentation:
Documentation history
Documentation examples
Here is a documentation example generated by the plugin based on a cucumber json output file:
The feature file for the above sample can be found here.
For more examples access here.
Jenkins pipeline step
Following is an example of pipeline step using this plugin:
node { step([$class: 'CukedoctorPublisher', featuresDir: '', format: 'HTML', hideFeaturesSection: false, hideScenarioKeyword: false, hideStepTime: false, hideSummary: false, hideTags: false, numbered: true, sectAnchors: true, title: 'Living Documentation', toc: 'RIGHT']) }
Since version 1.0.10 it is possible to use the livingDocs shortcut in pipeline DSL:
node { svn 'https://subversion.assembla.com/svn/cucumber-json-files/trunk' livingDocs() }
Parameters should be declared as key
: 'value'
as example below:
node { svn 'https://subversion.assembla.com/svn/cucumber-json-files/trunk' livingDocs(featuresDir:'cukedoctor') }
Or using the declarative pipeline:
pipeline { agent any stages { stage('Checkout') { steps { svn 'https://subversion.assembla.com/svn/cucumber-json-files/trunk' livingDocs(featuresDir:'cukedoctor') } } } }
Docker
An easy way to test this plugin is using a docker container, here are the steps (assuming you have docker installed):
Run the image:
docker run -it -p 8080:8080 rmpestano/jenkins-living-documentation
- Access http://localhost:8080/ and create a job;
Configure this svn repository: https://subversion.assembla.com/svn/cucumber-json-files/trunk
This repository contains cucumber json sample files for the living documentation plugin.
- Add the Living documentation post build action;
- Now you can run the job
use featuresDir to point to specific json output, a sub folder relative to workspace root dir, eg: cukedoctor.
Job output should look like:
Change Log
Version 2.2.2 (oct 19, 2018)
#28 CukedoctorProjectAction included null not assignable to interface hudson.model.Action
Version 2.2.1 (set 21, 2018)
- #24 Can't change theme in html documentation
- #25 Make the plugin work without content security policy
- #26 Documentation not found via Living documentation link
- #27 Update to Cukedoctor 1.2.1
Version 2.2.0 (set 20, 2018)
Version 2.1.2 (mar 24, 2018)
- Failed to serialize hudson.model.Project#publishers for class hudson.model.FreeStyleProject (JENKINS-50271)
- Fixes nested project references in Build actions (JENKINS-50273)
Version 2.1.1 (mar 11, 2018)
- #20 Do not fail build when content security policy is not relaxed
Version 1.1.3 (mar 11, 2018)
- #20 Do not fail build when content security policy is not relaxed
Version 2.1 (mar 09, 2018)
- Merge with v1.1.2
Version 2.0 (mar 09, 2018)
- #17 Use Jenkins 2.73 as baseline
Version 1.1.2 (mar 09, 2018)
Version 1.1.1 (mar 08, 2018)
- #16 Allow usage with 'sandbox' content security policy
Version 1.1.0 (mar 08, 2018)
Since this version the plugin will only work if content security policy is relaxed as described in this section. |
- #12 SECURITY-XXX
- #13 Store documentation history
- #14 Update to latest Asciidoctor
- #15 Don't rely on System properties for CukedoctorConfig
Version 1.0.12 (oct 19, 2017)
- #9 Pipeline dsl not found
Version 1.0.11 (sep 15, 2017)
- #8 Updates to latest Asciidoctor.
Version 1.0.10 (aug 13, 2017)
- #7 Simplifies pipeline script execution.
Version 1.0.9 (aug 7, 2017)
- Fixes documentation link in job console.
Version 1.0.8 (aug 6, 2017)
- Updates to Cukedoctor 1.0.7
Version 1.0.7 (fev 7, 2017)
- Support for Jenkins 2 pipelines
Version 1.0.6 (out 24, 2016)
- Updates to Cukedoctor 1.0.6;
- Documentation layout configuration:
- Hide 'Features' section;
- Hide summary;
- Hide 'scenario' and 'scenario outline' keyword on generated documentation;
- Hide step execution time;
- Hide tags.
- #17 Use Jenkins 2.73 as baseline
nests project references in Build actions
Attachments:
config01.png (image/png)
config.png (image/png)
config02.png (image/png)
initial.png (image/png)
all-docs.png (image/png)
all-docs2.png (image/png)
all-docs3.png (image/png)
cukedoctor-sample.png (image/png)
job-output.png (image/png)
doc-sample.png (image/png)
cukedoctor-sample.png (image/png)