pipeline{ agent any environment { repo_name = "angular-services" git_remote ="https://artikus.dynu.net:7990/r/${repo_name}.git" sys_id = "_apps_jars_" // Katalog z jar and deploy system_dir ="/_docker_data_/${sys_id}/" nginx_config_dir="${system_dir}/nginx-config" nginx_config = "${PROTOCOL}" } stages { stage('angular services update') { steps { echo("version 0.01") sh("java -version") script{ if( fileExists( repo_name ) ){ dir( repo_name ){ def git_pull ="git -c http.sslVerify=false pull" sh( git_pull ) } }else{ def git_clone ="git -c http.sslVerify=false clone ${git_remote}" echo( "Geting '${git_remote}' by clone from remote '${git_clone}'" ) sh( git_clone ) } } dir( repo_name ){ sh "git log -n 5" sh "docker compose -f deploy-this/deploy-dc.yml down" sh "mvn clean package" sh "cp ./target/*.jar /apps_data" sh "docker compose -f deploy-this/deploy-dc.yml up --detach" } } } } }