|
@@ -92,16 +92,10 @@ def commitChanges() {
|
92
|
92
|
// Check for changes
|
93
|
93
|
sh """
|
94
|
94
|
git checkout ${env.BRANCH_NAME}
|
95
|
|
- git status
|
96
|
95
|
git pull origin ${env.BRANCH_NAME}
|
97
|
|
- # Only proceed if there are changes
|
98
|
|
- if [[ $(git status -s) ]]; then
|
99
|
|
- git add .
|
100
|
|
- git commit -m "Moved processed XML files to backup"
|
101
|
|
- git push https://jenkinstest:Bizgaze123@code.bizgaze.com/devops.bizgaze/imports.git ${env.BRANCH_NAME}
|
102
|
|
- else
|
103
|
|
- echo "No changes to commit."
|
104
|
|
- fi
|
|
96
|
+ git add .
|
|
97
|
+ git commit -m "Moved processed XML files to backup"
|
|
98
|
+ git push --force https://jenkinstest:Bizgaze123@code.bizgaze.com/devops.bizgaze/imports.git ${env.BRANCH_NAME}
|
105
|
99
|
"""
|
106
|
100
|
}
|
107
|
101
|
|