Jenkins build is failing to push to GIT Error msg is :-
- git push --tags origin develop To ssh://alm.oraclecorp.com:2222/epm_pbcs_15318/pbcs.git ! [remote rejected] develop -> develop (Update requires 'Merge-Request' line present in the commit-message.) error: failed to push some refs to 'ssh://****@alm.oraclecorp.com:2222/epm_pbcs_15318/pbcs.git'
stage('Push')
{
withCredentials([usernamePassword(credentialsId: 'gitlogin', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
//sh("git tag -a some_tag -m 'Jenkins'")
sh('git push --tags origin $BRANCH_NAME')
}
if ("${BRANCH_NAME}"=="develop" || ("${BRANCH_NAME}".startsWith("release")))
{
sshagent (credentials: ['GitSSHLOGIN']) {
// sh("git tag -d PSTEST ")
sh("git tag -a PBCS_${BRANCH_NAME}_${ReleaseNumber}_${BUILD_NUMBER} -m 'Tag the build PBCS_${BRANCH_NAME}_${ReleaseNumber}_${BUILD_NUMBER}'")
sh('git push --tags origin $BRANCH_NAME')
It means that the "develop" branch in your remote repository has merge restriction (possibly for Code review approval) before MR can be merged. This should be configurable in your remote repository admin page
you should probably have options like : Open , Requires Review, Private ,Frozen etc for your branch