Browse Source

modified jenkins

Avinash 1 year ago
parent
commit
6efe08379f
1 changed files with 3 additions and 9 deletions
  1. 3
    9
      .jenkins/Jenkinsfile

+ 3
- 9
.jenkins/Jenkinsfile View File

92
     // Check for changes
92
     // Check for changes
93
     sh """
93
     sh """
94
         git checkout ${env.BRANCH_NAME}
94
         git checkout ${env.BRANCH_NAME}
95
-        git status
96
         git pull origin ${env.BRANCH_NAME}
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
 

Loading…
Cancel
Save