diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:38 +0000 |
commit | 574098461cd45be12a497afbdac6f93c58978387 (patch) | |
tree | 9eb60a5930b7c20d42f7fde1e234cae3968ed3d9 /packaging/docker/check_login.sh | |
parent | Adding upstream version 1.16.1. (diff) | |
download | netdata-574098461cd45be12a497afbdac6f93c58978387.tar.xz netdata-574098461cd45be12a497afbdac6f93c58978387.zip |
Adding upstream version 1.17.0.upstream/1.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/docker/check_login.sh')
-rwxr-xr-x | packaging/docker/check_login.sh | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/packaging/docker/check_login.sh b/packaging/docker/check_login.sh deleted file mode 100755 index 7cc8d4e5..00000000 --- a/packaging/docker/check_login.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# -# This is a credential checker script, to help get early input on docker credentials status -# If these are wrong, then build/publish has no point running -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud) - -set -e - -if [ "${BASH_VERSINFO[0]}" -lt "4" ]; then - echo "This mechanism currently can only run on BASH version 4 and above" - exit 1 -fi - -DOCKER_CMD="docker " - -# There is no reason to continue if we cannot log in to docker hub -if [ -z ${DOCKER_USERNAME+x} ] || [ -z ${DOCKER_PWD+x} ]; then - echo "No docker hub username or password found, aborting without publishing" - exit 1 -fi - -# If we are not in netdata git repo, at the top level directory, fail -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") -CWD=$(git rev-parse --show-cdup) -if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then - echo "Run as ./packaging/docker/$(basename "$0") from top level directory of netdata git repository" - echo "Docker build process aborted" - exit 1 -fi - -# Login to docker hub to allow futher operations -echo "Attempting to login to docker" -echo "$DOCKER_PWD" | $DOCKER_CMD login -u "$DOCKER_USERNAME" --password-stdin - -echo "Docker login successful!" -$DOCKER_CMD logout - -echo "Docker login validation completed" |