Changes not being displayed on jenkins build summary and in email body

12 views
Skip to first unread message

Dominic Espiritu

unread,
Jan 9, 2020, 9:59:08 AM1/9/20
to Jenkins Users
On my jenkins Job (type of pipeline), I use gerrit-trigger and on the pipeline script definition I run "git fetch --tags --progress -- ${PROJECT_URL} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD",
Values:

GERRIT_REFSPEC = refs/changes/*:refs/changes/*
PROJECT_URL = <repo url>

I can get the file changes but those files are not listen on my jenkins summary page and in the email body,

I would like to ask for help on this.

Thanks,
Dominic
jenkins-script.jfif
mail-content.jfif
jenkins-summary.jfif

Björn Pedersen

unread,
Jan 9, 2020, 10:05:23 AM1/9/20
to Jenkins Users


Am Donnerstag, 9. Januar 2020 15:59:08 UTC+1 schrieb Dominic Espiritu:
On my jenkins Job (type of pipeline), I use gerrit-trigger and on the pipeline script definition I run "git fetch --tags --progress -- ${PROJECT_URL} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD",

You need to make jenkins aware that you  are using git, so use a scm/checkout  step to checkout the changes.

 
    checkout(
        changelog
: true, poll: false,
        scm
: [$class: 'GitSCM',
              branches
: [[name: "$GERRIT_BRANCH"]],
              doGenerateSubmoduleConfigurations
: false, submoduleCfg: [],
              userRemoteConfigs
: [
                 
[refspec: GERRIT_REFSPEC,
                   url
: <host> + GERRIT_PROJECT
                 
]
             
],
              extensions
: [
                 
[$class: 'hudson.plugins.git.extensions.impl.BuildChooserSetting',
                   buildChooser
: [$class: "com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser"]],
             
]
           
]
       
)



Dominic Espiritu

unread,
Jan 10, 2020, 8:05:32 AM1/10/20
to Jenkins Users
Thanks Björn Pedersen, this is now working properly. :-)
Reply all
Reply to author
Forward
0 new messages