Browse Source

modified jenkins file

devops.bizgaze 2 years ago
parent
commit
1ad2f09d98
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      jenkins/Jenkinsfile

+ 3
- 1
jenkins/Jenkinsfile View File

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

Loading…
Cancel
Save