Add devnulls and fix login function's log output.
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		| @@ -28,7 +28,7 @@ steps: | |||||||
|     privileged: true |     privileged: true | ||||||
|     environment: |     environment: | ||||||
|       REGISTRY: code.pztrn.name |       REGISTRY: code.pztrn.name | ||||||
|       REGISTRY_PROJECT: /containers/mirrors |       REGISTRY_PROJECT: /containers/mirror | ||||||
|       REGISTRY_USERNAME: drone |       REGISTRY_USERNAME: drone | ||||||
|       REGISTRY_PASSWORD: |       REGISTRY_PASSWORD: | ||||||
|         from_secret: drone_secret |         from_secret: drone_secret | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								mirror.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								mirror.sh
									
									
									
									
									
								
							| @@ -105,7 +105,7 @@ function get_arm64_image() { | |||||||
|  |  | ||||||
| function login_to_registry() { | function login_to_registry() { | ||||||
| 	# Login to registry. | 	# Login to registry. | ||||||
| 	echo "Logging into '${REGISTRY}' as '${USER}'..." | 	echo "Logging into '${REGISTRY}' as '${REGISTRY_USERNAME}'..." | ||||||
| 	docker login -u "${REGISTRY_USERNAME}" -p "${REGISTRY_PASSWORD}" "${REGISTRY}" | 	docker login -u "${REGISTRY_USERNAME}" -p "${REGISTRY_PASSWORD}" "${REGISTRY}" | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -132,12 +132,16 @@ function mirror() { | |||||||
| function push_multiarch_image() { | function push_multiarch_image() { | ||||||
| 	local image=$1 | 	local image=$1 | ||||||
|  |  | ||||||
| 	if ! docker push "${REMOTE_IMAGE}"-amd64; then | 	if ! docker push "${REMOTE_IMAGE}"-amd64 &> /dev/null; then | ||||||
| 		echo -e "\t! amd64 image push failed!" | 		echo -e "\t! amd64 image push failed!" | ||||||
|  | 	else | ||||||
|  | 		echo -e "\t* amd64 image pushed" | ||||||
| 	fi | 	fi | ||||||
|  |  | ||||||
| 	if ! docker push "${REMOTE_IMAGE}"-arm64; then | 	if ! docker push "${REMOTE_IMAGE}"-arm64 &> /dev/null; then | ||||||
| 		echo -e "\t! arm64 image push failed!" | 		echo -e "\t! arm64 image push failed!" | ||||||
|  | 	else | ||||||
|  | 		echo -e "\t* arm64 image pushed" | ||||||
| 	fi | 	fi | ||||||
|  |  | ||||||
| 	if [ ${MULTIARCH} -eq 1 ]; then | 	if [ ${MULTIARCH} -eq 1 ]; then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user