add git pull before the deploy script

This commit is contained in:
Roberto Cirillo 2022-10-11 10:21:31 +02:00
parent d4fff4a12d
commit af670ec274
1 changed files with 2 additions and 2 deletions

4
Jenkinsfile vendored
View File

@ -290,7 +290,7 @@ pipeline {
def deploy(String service, String version, String host){
def now = new Date();
println("Going to deploy the service "+service+" with version: "+version+" on target: "+host);
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;./deployService.sh $service $version $host;", returnStdout: true);
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;git pull;./deployService.sh $service $version $host;", returnStdout: true);
sh("""
echo " last exit code \$?";
""")
@ -312,7 +312,7 @@ def checkup(String service, String version, String host){
def deployRelease(String service, String version){
def now = new Date();
println("Going to deploy the service "+service+" with version: "+version+" on preproduction ");
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;./deployPreprodService.sh $service $version ;", returnStdout: true);
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;git pull;./deployPreprodService.sh $service $version ;", returnStdout: true);
sh("""
echo " last exit code \$?";
""")