|
@@ -33,6 +33,7 @@ pipeline {
|
33
|
33
|
process_folder('./app', 'app')
|
34
|
34
|
process_folder('./report', 'report')
|
35
|
35
|
process_folder('./form', 'form')
|
|
36
|
+ commitChanges()
|
36
|
37
|
}
|
37
|
38
|
}
|
38
|
39
|
}
|
|
@@ -74,3 +75,20 @@ def process_folder(folder, import_type) {
|
74
|
75
|
}
|
75
|
76
|
}
|
76
|
77
|
}
|
|
78
|
+
|
|
79
|
+def commitChanges() {
|
|
80
|
+ // Configure Git
|
|
81
|
+ sh """
|
|
82
|
+ git config user.email "jenkins@bizgaze.in"
|
|
83
|
+ git config user.name "jenkinstest"
|
|
84
|
+ """
|
|
85
|
+
|
|
86
|
+ // Check for changes
|
|
87
|
+ sh """
|
|
88
|
+ git checkout ${env.BRANCH_NAME}
|
|
89
|
+ git add .
|
|
90
|
+ git commit -m "Moved processed XML files to backup"
|
|
91
|
+ git push https://jenkinstest:Bizgaze123@code.bizgaze.com/devops.bizgaze/imports.git ${env.BRANCH_NAME}
|
|
92
|
+ """
|
|
93
|
+}
|
|
94
|
+
|