Steps:
- Create Pipeline job for any project on github.
node { def mvnHome stage('Preparation') { git 'https://github.com/user-github/project.git' mvnHome = tool 'M3' } stage('Build') { if (isUnix()) { sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package" } else { bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/) } stage('Results') { junit '**/target/surefire-reports/TEST-*.xml' archive 'target/*.jar' } }
- Open this project on github.
- Edit any files via the web interface. Commit.
- Run this job.
- Check Recent Changes:
Expected Result: Recent changes have been made the correct user from github.
Actual Result: Recent changes have been made the "noreply" user.
Correct git log:commit 497fb99ae5c481f72ea34fa2e190afa908660798 Author: ksenia-nenasheva <ks.nenasheva@gmail.com> Date: Tue Oct 4 14:46:24 2016 +0200 Update Jenkinsfile commit bbf860b9a6c7a28208b717d42e6f8665b21063a8 Author: ksenia-nenasheva <ks.nenasheva@gmail.com> Date: Tue Oct 4 14:18:41 2016 +0200 Update Jenkinsfile commit 7312064526032f050b04335b4676b27b48a698f0 Author: ksenia-nenasheva <ks.nenasheva@gmail.com> Date: Tue Oct 4 13:56:31 2016 +0200 Update Jenkinsfile
Please see the attached screenshots.