Update Jenkinsfile
This commit is contained in:
		
							parent
							
								
									60951e9a1d
								
							
						
					
					
						commit
						c170691e66
					
				| 
						 | 
					@ -13,7 +13,7 @@ pipeline {
 | 
				
			||||||
                sh 'docker stop $(docker ps -q --filter ancestor=microblog:latest) || true && docker rm $(docker ps -q --filter ancestor=microblog:latest) || true'
 | 
					                sh 'docker stop $(docker ps -q --filter ancestor=microblog:latest) || true && docker rm $(docker ps -q --filter ancestor=microblog:latest) || true'
 | 
				
			||||||
                // Deploy new container
 | 
					                // Deploy new container
 | 
				
			||||||
                sh 'docker run --name microblog -d -p 5000:5000 --rm microblog:latest'
 | 
					                sh 'docker run --name microblog -d -p 5000:5000 --rm microblog:latest'
 | 
				
			||||||
                // Remove all images that don't have a container running them
 | 
					                // Remove all images except for jenkins
 | 
				
			||||||
                sh 'docker image prune --filter "label!=org.opencontainers.image.vendor=Jenkins project"'
 | 
					                sh 'docker image prune --filter "label!=org.opencontainers.image.vendor=Jenkins project"'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue