git-changelog-lib
git-changelog-lib copied to clipboard
Error while creating change log
Getting below error
se.bjurr.gitchangelog.api.exceptions.GitChangelogRepositoryException .md file not found in jenkins workspace.
Git change log plugin version : 3.13
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:1001) at hudson.FilePath.act(FilePath.java:1160) at org.jenkinsci.plugins.gitchangelog.steps.GitChangelogStep$1.run(GitChangelogStep.java:338) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
Jenkins version : 2.250
Are you sure there is not more stacktrace? How did you configure the plugin?
Hi,
I have configured using Jenkins, manage plugins,
Even changelog.md is created in local work space, your help is much appreciated, with free style job, its working as expected, but in pipeline getting the above error.
Can you supply your pipeline code?
def changelogString = gitChangelog returnType: 'STRING', from: [type: 'REF', value: 'CHANGELOG.md'], to: [type: 'REF', value: 'demo'],
demo is branch name
ref should be a branch or a tag. You probably dont have such a branch or tag named CHANGELOG.md
.
def changelogString = gitChangelog returnType: 'STRING', from: [type: 'REF', value: 'CHANGELOG.md'], to: [type: 'REF', value: 'demo'], template: """
Git Changelog changelog
Changelog of Git Changelog.
{{#tags}}
{{name}}
{{#issues}} {{#hasIssue}} {{#hasLink}}{{name}} {{issue}} {{title}}
{{/hasLink}} {{^hasLink}}{{name}} {{issue}} {{title}}
{{/hasLink}} {{/hasIssue}} {{^hasIssue}}{{name}}
{{/hasIssue}}{{#commits}} {{hash}} {{authorName}} {{commitTime}}
{{{messageTitle}}}
{{#messageBodyItems}}
{{/commits}}
{{/issues}} {{/tags}} """
at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:139) at se.bjurr.gitchangelog.api.GitChangelogApi.getId(GitChangelogApi.java:615) at se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:567) at se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:83) at se.bjurr.gitchangelog.api.GitChangelogApi.render(GitChangelogApi.java:109) at se.bjurr.gitchangelog.api.GitChangelogApi.render(GitChangelogApi.java:140) at org.jenkinsci.plugins.gitchangelog.steps.GitChangelogStep.perform(GitChangelogStep.java:422) at org.jenkinsci.plugins.gitchangelog.steps.GitChangelogStep.access$000(GitChangelogStep.java:45) at org.jenkinsci.plugins.gitchangelog.steps.GitChangelogStep$1$1.call(GitChangelogStep.java:334) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:375) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
ref should be a branch or a tag. You probably dont have such a branch or tag named
CHANGELOG.md
. Given some this like this def changelogString = gitChangelog returnType: 'STRING', from: [type: 'REF', value: 'demo'], to: [type: 'REF', value: 'demo'], thought build is successful, in workspace not able to find demo
am I missing some thing
managed to resolve issue, gitChangelog from: [type: 'REF', value: 'demo'], returnType: 'STRING', to: [type: 'REF', value: 'demo'] how to save it to changelog.md file, in free style job we can.