| 
					
				 | 
			
			
				@@ -2,6 +2,9 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   agent { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     label "swarm" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  options { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ansiColor('xterm') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   environment { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     DOCKER_REGISTRY='dev-registry.infoclinica.ru:5000' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     DOCKER_IMAGE='admin-lab' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -41,13 +44,13 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   stages { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     stage("Build") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       steps { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Building ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        echo "\u001B[32m \u2600 Building \u001B[35m ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}. \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sh "docker build --build-arg repo=${repo} --build-arg version=${version} --no-cache -t ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} ." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /*    stage("Publish") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       steps { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Publishing ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        echo "\u001B[32m \u2600 Publishing \u001B[35m ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sh "docker push ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -57,7 +60,7 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         script { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           for (String item : service_update.split()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              echo "Updating $item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              echo "\u001B[32m \u2600 Updating \u27A1 $item \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (cluster == 'prod') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 withEnv(["service_name=${item}"]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   sh '''export DOCKER_CERT_PATH=/run/secrets/swarm 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -101,10 +104,10 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     stage("Tagging"){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       steps{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Setting latest tag" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        echo "\u001B[32m \u2600 Setting latest tag \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sh '''docker tag ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:latest 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               docker push ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:latest''' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Updating tag info in ${SWARM_GIT_NAME} repository" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        echo "\u001B[32m \u2600 Updating tag info in \u001B[35m ${SWARM_GIT_NAME} repository \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           sh '''GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   git clone ${SWARM_GIT_URL} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -123,7 +126,7 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   post { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     always { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      echo "CleaningUp work diretory" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      echo "\u001B[32m \u2600 CleaningUp work diretory \u001B[0m" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       deleteDir() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     failure { 
			 |