mirror of https://github.com/goharbor/harbor.git
				
				
				
			
		
			
				
	
	
		
			19 lines
		
	
	
		
			518 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			518 B
		
	
	
	
		
			Python
		
	
	
	
| # -*- coding: utf-8 -*-
 | |
| import base
 | |
| 
 | |
| def login(registry, username, password):
 | |
|     command = ["podman", "login", "-u", username, "-p", password, registry]
 | |
|     base.run_command(command)
 | |
| 
 | |
| def logout(registry):
 | |
|     command = ["podman", "logout", registry]
 | |
|     base.run_command(command)
 | |
| 
 | |
| def pull(artifact):
 | |
|     command = ["podman", "pull", artifact]
 | |
|     base.run_command(command)
 | |
| 
 | |
| def push(source_artifact, target_artifact):
 | |
|     command = ["podman", "push", source_artifact, target_artifact]
 | |
|     base.run_command(command)
 |