Last active
February 1, 2017 22:49
-
-
Save johnbuhay/fbc710cc77bd5e5e7f196fe0ab16fd92 to your computer and use it in GitHub Desktop.
Jenkins configuration snippets | Job DSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
# this is technically Jenkins Job Dsl | |
version = 1 | |
job('example') { | |
publishers { | |
configure { node -> | |
node / 'publishers' << 'hudson.plugins.doclinks.DocLinksPublisher' {} | |
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' << 'documents' {} | |
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' / 'documents' << 'hudson.plugins.doclinks.Document' { | |
title('Code Coverage') | |
description('Coverage report generated by rspec') | |
directory('coverage') | |
recursive(true) | |
file('index.html') | |
id(1) | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
... | |
<publishers> | |
<hudson.plugins.doclinks.DocLinksPublisher plugin="[email protected]"> | |
<documents> | |
<hudson.plugins.doclinks.Document> | |
<title>Code Coverage</title> | |
<description>Coverage report generated by rspec</description> | |
<directory>coverage</directory> | |
<recursive>true</recursive> | |
<file>index.html</file> | |
<id>1</id> | |
</hudson.plugins.doclinks.Document> | |
</documents> | |
</hudson.plugins.doclinks.DocLinksPublisher> | |
</publishers> | |
<buildWrappers/> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment