The following plugin provides functionality available through
Pipeline-compatible steps. Read more about how to integrate steps into your
Pipeline in the
Steps
section of the
Pipeline Syntax
page.
For a list of other such plugins, see the
Pipeline Steps Reference
page.
Confluence Publisher
publishConfluence
: Publish to Confluence
siteName : String
spaceName : String
Enter the Space name of the wiki page. E.g., the string after "display" in the page's URL: http://confluence.example.com/display/
Space/Page
If the Space name contains a build-time variable, the validity of the name cannot be verified until build-time.
pageName : String
Enter the Space name of the wiki page. E.g., the string after the Space name in the page's URL: http://confluence.example.com/display/Space/
Page
If the Space name or Page name contains a build-time variable, the validity of the page cannot be verified until build-time.
attachArchivedArtifacts : boolean
(optional)
If checked, the plugin will automatically upload all of the archived artifacts (from the Artifact Archiver plugin). In that case, you don't need to reiterate the fileset pattern that is configured for the archiver.
buildIfUnstable : boolean
(optional)
If checked, the plugin will continue publishing, even if the build was not successful. In that case, you can use the ${BUILD_RESULT} build variable to indicate the current build result.
If this box is
not checked, then ${BUILD_RESULT} can always only be "SUCCESS".
editorList
(optional)
Configure wiki markup generation and replacement/insertion settings.
Available markup generators:
You can get links of uploaded attachments. Variable like $LINK[n] will be replaced with link which match link of uploaded attachment on Confluence.Where n is position number of attached file(links in array LINK[] will be provided in uploading order on Confluence). Example of usage:
<a href="$LINK[0]">$JOB_NAME build artifact</a>
- Plain text
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
Available editors:
- Prepend
Content is added to the very beginning of the page
- Append
Content is added to the very end of the page.
- Before Token
Content is inserted before a configurable marker token.
- After Token
Content is inserted after a configurable marker token.
- Between Tokens
Content is inserted between two configurable start/end marker tokens. Existing content between the tokens is replaced.
Array / List of Nested Choice of Objects
confluenceAfterToken
The generated content will be inserted immediately after the marker token (with a newline separator).
Example:
- Token = "{jenkins-marker:after}"
- Generated text = "2011-06-19"
- Existing content:
Lorem ipsum
{jenkins-marker:after}
Ipsum lorem
- New content:
Lorem ipsum
{jenkins-marker:after}
2011-06-19
Ipsum lorem
If you have administrative access to your Confluence installation, consider creating a custom user macro:
- Name: jenkins-marker
- [ ] Macro has a body (uncheck the box)
- "Macro generates HTML markup"
- Template: **blank**
This will create a new macro ("{jenkins-marker}"), which you can use to mark the location after which content will be inserted. Using the confluence macro tag parameter capability, you can reuse this single tag configuration for several single-token (Before/After) editors, by simply making the string after the colon unique (e.g., "{jenkins-marker:build-url-inserted-after-this}").
This token configuration does not render in the wiki output.
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
markerToken : String
Enter the marker token where the content should be inserted. The replacement content will be inserted after this token.
The token should already exist in the configured Confluence page markup.
Example: "{jenkins-marker:build-urls}"
confluenceAppendPage
The generated content will be inserted at the end of the page content (e.g., "<existing-content> + <newline> + <generated>").
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
confluenceBeforeToken
The generated content will be inserted immediately before the marker token (with a newline separator).
Example:
- Token = "{jenkins-marker:before}"
- Generated text = "2011-06-19"
- Existing content:
Lorem ipsum
{jenkins-marker:before}
Ipsum lorem
- New content:
Lorem ipsum
2011-06-19
{jenkins-marker:before}
Ipsum lorem
If you have administrative access to your Confluence installation, consider creating a custom user macro:
- Name: jenkins-marker
- [ ] Macro has a body (uncheck the box)
- "Macro generates HTML markup"
- Template: **blank**
This will create a new macro ("{jenkins-marker}"), which you can use to mark the location before which content will be inserted. Using the confluence macro tag parameter capability, you can reuse this single tag configuration for several single-token (Before/After) editors, by simply making the string after the colon unique (e.g., "{jenkins-marker:build-url-inserted-before-this}").
This token configuration does not render in the wiki output.
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
markerToken : String
Enter the marker token where the content should be inserted. The replacement content will be inserted before this token.
The token should already exist in the configured Confluence page markup.
confluenceBetweenTokens
The generated content will be inserted between the START and END markers. Both markers must exist in the page. Any existing content between the markers will be
replaced.
Example:
- Start Token = "{jenkins-between:start|token=replaced-section}"
- End Token = "{jenkins-between:end|token=replaced-section}"
- Generated text = "2011-06-19"
- Existing content:
Lorem ipsum
{jenkins-between:start|token=replaced-section}
previous content
{jenkins-between:end|token=replaced-section}
Ipsum lorem
- New content:
Lorem ipsum
{jenkins-between:start|token=replaced-section}
2011-06-19
{jenkins-between:end|token=replaced-section}
Ipsum lorem
If you have administrative access to your Confluence installation, consider creating a custom user macro:
- Name: jenkins-between
- [X] Macro has a body
- "Use unprocessed macro body"
- "Macro generates wiki markup"
- Template: **blank**
This will create a new macro ("{jenkins-between}"), which you can use to mark the start/end tokens. Using the Confluence macro tag parameter capability, you can use this single tag configuration for several "Between start/end token" edits, and simply make each individual editor configuration use a unique parameter (also remember to make the start/end tags unique as well).
This token configuration maintains the Wiki rendering aspect of the replacement text, and the token does not render in the formatted wiki output.
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
startMarkerToken : String
Enter the token where the marked section should
begin. The replacement content will be inserted after this token.
Both tokens should already exist in the configured Confluence page markup.
endMarkerToken : String
Enter the token where the marked section should
end. The replacement content will be inserted before this token.
Both tokens should already exist in the configured Confluence page markup.
confluenceWritePage
The generated content will replace the entire page's content. Use with care
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
confluencePrependPage
The generated content will be inserted at the beginning of the page content (e.g., "<generated> + <newline> + <existing-content>").
generator
Nested Choice of Objects
confluenceFile
filename : String
Enter a filename relative to the workspace directory. The file's contents will be used as markup replacement for the editor. Note: the file should be in text format, and should contain text content that is already suitable for wiki rendering.
confluenceText
text : String
Enter custom text for the replacement. Build variables in the replacement text will be expanded.
fileSet : String
(optional)
labels : String
(optional)
Comma, or space, separated list of labels to apply to the Confluence page.
parentId : long
(optional)
(Optional) Enter the page ID of the parent wiki page. You can find this identifier by accessing the parent page in question, and then selecting "Page Information" or "Page History" from the Confluence
Tools menu. The pageId will appear as a query parameter in the address bar. e.g. (
pageId=1234567
)
If a parent is not specified, the space home will be used as the parent.
This field is used for creating new pages only. If the page already exists, then parentId is discarded.
replaceAttachments : boolean
(optional)
If checked, the plugin will automatically replace the existing file with the new file with the same name. For correct work jenkins user should have permission to delete files from selected page. BE CAREFUL WITH THIS OPTION
Was this page helpful?
Please submit your feedback about this page through this
quick form.
Alternatively, if you don't wish to complete the quick form, you can simply
indicate if you found this page helpful?
See existing feedback here.