Add devnulls and fix login function's log output.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Stanislav Nikitin 2022-06-28 20:25:11 +05:00
parent 481b2464a4
commit ac39480c97
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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