2.20 not rendering html on the build page
Closed this issue · 3 comments
atomlab commented
Hello. I created stage for changelog page, but html template not rendering.
Plugin version 2.20
pipeline {
agent { label 'agent' }
stages {
stage('build'){
steps {
echo 'build'
}
}
stage('update commits') {
steps {
script {
def changelogString = gitChangelog returnType: 'STRING',
from: [type: 'REF', value: 'staging'],
to: [type: 'REF', value: 'master'],
template: """
<h1> Git Changelog changelog </h1>
<p>
Changelog of Git Changelog.
</p>
{{#tags}}
<h2> {{name}} </h2>
{{#issues}}
{{#hasIssue}}
{{#hasLink}}
<h2> {{name}} <a href="{{link}}">{{issue}}</a> {{title}} </h2>
{{/hasLink}}
{{^hasLink}}
<h2> {{name}} {{issue}} {{title}} </h2>
{{/hasLink}}
{{/hasIssue}}
{{^hasIssue}}
<h2> {{name}} </h2>
{{/hasIssue}}
{{#commits}}
<a href="https://github.com/user/repo/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
<p>
<h3>{{{messageTitle}}}</h3>
{{#messageBodyItems}}
<li> {{.}}</li>
{{/messageBodyItems}}
</p>
{{/commits}}
{{/issues}}
{{/tags}}
"""
currentBuild.description = changelogString
}
}
}
}
}
tomasbjerre commented
You need to enable html rendering in jenkins global security settings
tomasbjerre commented
Closing because it is not related to the plugin.
atomlab commented