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:
parent
481b2464a4
commit
ac39480c97
@ -28,7 +28,7 @@ steps:
|
||||
privileged: true
|
||||
environment:
|
||||
REGISTRY: code.pztrn.name
|
||||
REGISTRY_PROJECT: /containers/mirrors
|
||||
REGISTRY_PROJECT: /containers/mirror
|
||||
REGISTRY_USERNAME: drone
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: drone_secret
|
||||
|
10
mirror.sh
10
mirror.sh
@ -105,7 +105,7 @@ function get_arm64_image() {
|
||||
|
||||
function 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}"
|
||||
}
|
||||
|
||||
@ -132,12 +132,16 @@ function mirror() {
|
||||
function push_multiarch_image() {
|
||||
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!"
|
||||
else
|
||||
echo -e "\t* amd64 image pushed"
|
||||
fi
|
||||
|
||||
if ! docker push "${REMOTE_IMAGE}"-arm64; then
|
||||
if ! docker push "${REMOTE_IMAGE}"-arm64 &> /dev/null; then
|
||||
echo -e "\t! arm64 image push failed!"
|
||||
else
|
||||
echo -e "\t* arm64 image pushed"
|
||||
fi
|
||||
|
||||
if [ ${MULTIARCH} -eq 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user