| 
					
				 | 
			
			
				@@ -8,11 +8,6 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     docker_image='node' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   parameters { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    string( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      name: "build", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      defaultValue: "true", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      description: "To build image set built to 'true'. To not build, set parameter to anything else - 'false'." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     string( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       name: "repo", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       defaultValue: "prod", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -20,24 +15,19 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     string( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       name: "service_update", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      defaultValue: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      description: "Services to update - i.e. info_node or/and info_node-api. Lave empty to not update services." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      defaultValue: "info_node info_node-api", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      description: "Services to update - i.e. info_node or/and info_node-api." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   stages { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     stage("Build") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      when { expression { build == "true" } } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       steps { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Building with repo $repo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sh "echo docker build --build-arg repo=${repo} --no-cache -t ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        sh "false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     stage("Publish") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      when { expression { build == "true" } } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       steps { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "Building with repo $repo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        sh "sleep 10; echo docker build --build-arg repo=${repo} --no-cache -t ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sh "echo docker push ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER}" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     stage("Update") { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -47,6 +37,7 @@ pipeline { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         script { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           for (String item : service_update.split()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             echo "Updating $item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sh 'false' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sh 'ls' 
			 |