jennifer Brown
jennifer Brown

Reputation: 91

${CHANGES} does not work in the mail-ext plugin if jenkins job is driven by a bash script

I have setup a Jenkins job to build a project. I'm using email-ext plugin to send out build notifications with the intent of showing who did what and the path to the files changed. But unfortunately I'm not getting anything. I believe the reason why is that under "Source Code Management" I'm setting it to "None". My shell script that I'm using to drive the build is responsible for check-in out a copy of the code based on a CVS tag and run maven to do the build. In the ext-email i'm using the following syntax

${CHANGES_SINCE_LAST_SUCCESS, reverse=true, showPaths=true,
format="\n====\nChanges for Build # %n\n%c\n",
changesFormat="\n[%r] %d %a %m %p\n"}

Same thing with CHANGES: ${CHANGES, showPaths=true}

Is there a way of getting CHANGES and CHANGES_SINCE_LAST_SUCCESS to work if None option is used under Source Code Management?

Thanks for your help folks.

Upvotes: 1

Views: 2694

Answers (1)

malenkiy_scot
malenkiy_scot

Reputation: 16615

EmailExt plugin gets that info from Jenkins. As Jenkins has access to that info only via its SCM plugins the answer is "no", you can't do it without specifying the SCM option.

There are two things you can do:

(1) Do it by hand. Which with CVS, if I remember correctly, means having a working copy checked out anyway. (2) Use SCM checkout/update option, but store the working copy on the side without using it in the build. You'll use twice as much disk-space, but nowadays disk-space is not a problem.

By the way, why are you using CVS? SVN, GIT, and Mercurial are all free.

Upvotes: 2

Related Questions