I have been using one Jenkins job, that will pull repository from gitlab. Then it will modify the files and push it into gitlab (only if any user added any new files/modify contents in gitlab). Otherwise, it simply does empty commit. When empty commits & push happens, Jenkins job shows me like the job is failed. For only this case, I want to make Jenkins should show as successful. Is there any way to do it?
UPDATE: Here is the log I got from the job. I am expecting SUCCESS even if the Jenkins git pushes the empty repository (as shown as the below).
[1. Extract simplified configuration] $ /bin/sh -xe
/tmp/jenkins2112147489595430303.sh
+ chmod +x script.sh
+ ./script.sh
+ git add .
+ git commit -a -m 'Changes pushed by Jenkins'
HEAD detached at ee35229
nothing to commit, working directory clean
Build step 'Execute shell' marked build as failure
Triggering a new build of 2. Erase Answers
Finished: FAILURE