More colors

This commit is contained in:
Eric Nemchik 2020-07-01 15:40:24 -05:00
parent 504cbc155f
commit c872288faa
5 changed files with 26 additions and 26 deletions

View file

@ -74,7 +74,7 @@ ValidateInput()
echo "Successfully found:[IMAGE_REPO], value:[$IMAGE_REPO]"
else
# This is a fork and we cant pull vars or any info
echo "WARN! No image to cleanup as this is a forked branch, and not being built with current automation!"
echo -e "${NC}${F[Y]}WARN!${NC} No image to cleanup as this is a forked branch, and not being built with current automation!"
exit 0
fi

View file

@ -64,7 +64,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_WORKSPACE]"
exit 1
else
echo "Successfully found:[GITHUB_WORKSPACE], value:[$GITHUB_WORKSPACE]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[$GITHUB_WORKSPACE]${NC}"
fi
#####################
@ -75,7 +75,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$REGISTRY]"
exit 1
else
echo "Successfully found:[REGISTRY], value:[$REGISTRY]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[REGISTRY]${F[B]}, value:${F[W]}[$REGISTRY]${NC}"
fi
#####################################################
@ -90,7 +90,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GPR_USERNAME]"
exit 1
else
echo "Successfully found:[GPR_USERNAME], value:[$GPR_USERNAME]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GPR_USERNAME]${F[B]}, value:${F[W]}[$GPR_USERNAME]${NC}"
fi
######################
@ -101,7 +101,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GPR_TOKEN]"
exit 1
else
echo "Successfully found:[GPR_TOKEN], value:[********]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GPR_TOKEN]${F[B]}, value:${F[W]}[********]${NC}"
fi
########################################
# See if we need values for Ducker hub #
@ -115,7 +115,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$DOCKER_USERNAME]"
exit 1
else
echo "Successfully found:[DOCKER_USERNAME], value:[$DOCKER_USERNAME]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKER_USERNAME]${F[B]}, value:${F[W]}[$DOCKER_USERNAME]${NC}"
fi
############################
@ -126,7 +126,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$DOCKER_PASSWORD]"
exit 1
else
echo "Successfully found:[DOCKER_PASSWORD], value:[********]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKER_PASSWORD]${F[B]}, value:${F[B]}[********]${NC}"
fi
###########################################
# We were not passed a registry to update #
@ -146,7 +146,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$IMAGE_REPO]"
exit 1
else
echo "Successfully found:[IMAGE_REPO], value:[$IMAGE_REPO]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[IMAGE_REPO]${F[B]}, value:${F[W]}[$IMAGE_REPO]${NC}"
###############################################
# Need to see if GPR registry and update name #
###############################################
@ -161,7 +161,7 @@ ValidateInput()
# Validate IMAGE_VERSION #
##########################
if [ -z "$IMAGE_VERSION" ]; then
echo "WARN! Failed to get [IMAGE_VERSION]!"
echo -e "${NC}${F[Y]}WARN!${NC} Failed to get [IMAGE_VERSION]!"
echo "Pulling from Branch Name..."
##############################
# Get the name of the branch #
@ -193,7 +193,7 @@ ValidateInput()
IMAGE_VERSION="$BRANCH_NAME"
echo "Tag:[$IMAGE_VERSION]"
else
echo "Successfully found:[IMAGE_VERSION], value:[$IMAGE_VERSION]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[IMAGE_VERSION]${F[B]}, value:${F[W]}[$IMAGE_VERSION]${NC}"
fi
##################################
@ -228,7 +228,7 @@ ValidateInput()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$DOCKERFILE_PATH]"
exit 1
else
echo "Successfully found:[DOCKERFILE_PATH], value:[$DOCKERFILE_PATH]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKERFILE_PATH]${F[B]}, value:${F[W]}[$DOCKERFILE_PATH]${NC}"
fi
}
################################################################################
@ -272,7 +272,7 @@ Authenticate()
exit 1
else
# SUCCESS
echo "Successfully authenticated to $NAME!"
echo -e "${NC}${F[B]}Successfully authenticated to $NAME!${NC}"
fi
}
################################################################################
@ -378,7 +378,7 @@ UploadImage()
exit 1
else
# SUCCESS
echo "Successfully Uploaded Docker image:[$IMAGE_VERSION] to $REGISTRY!"
echo -e "${NC}${F[B]}Successfully Uploaded Docker image:${F[W]}[$IMAGE_VERSION]${F[B]} to $REGISTRY!${NC}"
fi
#########################
@ -444,7 +444,7 @@ UploadImage()
exit 1
else
# SUCCESS
echo "Successfully Uploaded TAGOR_TAG:[$MAJOR_TAG] Docker image to $REGISTRY!"
echo -e "${NC}${F[B]}Successfully Uploaded TAGOR_TAG:${F[W]}[$MAJOR_TAG]${F[B]} Docker image to $REGISTRY!${NC}"
fi
fi
}

View file

@ -374,7 +374,7 @@ function BuildFileList()
#######################
# It is a bash script #
#######################
echo "WARN! Found bash script without extension:[.sh]"
echo -e "${NC}${F[Y]}WARN!${NC} Found bash script without extension:[.sh]"
echo "Please update file with proper extensions."
################################
# Append the file to the array #
@ -388,7 +388,7 @@ function BuildFileList()
#######################
# It is a Ruby script #
#######################
echo "WARN! Found ruby script without extension:[.rb]"
echo -e "${NC}${F[Y]}WARN!${NC} Found ruby script without extension:[.rb]"
echo "Please update file with proper extensions."
################################
# Append the file to the array #
@ -402,7 +402,7 @@ function BuildFileList()
############################
# Extension was not found! #
############################
echo " - WARN! Failed to get filetype for:[$FILE]!"
echo -e "${NC}${F[Y]} - WARN!${NC} Failed to get filetype for:[$FILE]!"
##########################################################
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
##########################################################

View file

@ -279,7 +279,7 @@ GetLinterVersions()
# Check the shell for errors #
##############################
if [ $ERROR_CODE -ne 0 ] || [ -z "${GET_VERSION_CMD[*]}" ]; then
echo "WARN! Failed to get version info for:[$LINTER]"
echo -e "${NC}${F[Y]}WARN!${NC} Failed to get version info for:[$LINTER]"
echo "---------------------------------------------"
else
##########################
@ -580,7 +580,7 @@ GetGitHubVars()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_SHA]"
exit 1
else
echo "Successfully found:[GITHUB_SHA], value:[$GITHUB_SHA]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_SHA]${F[B]}, value:${F[W]}[$GITHUB_SHA]${NC}"
fi
############################
@ -591,7 +591,7 @@ GetGitHubVars()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_WORKSPACE]"
exit 1
else
echo "Successfully found:[GITHUB_WORKSPACE], value:[$GITHUB_WORKSPACE]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[$GITHUB_WORKSPACE]${NC}"
fi
############################
@ -602,7 +602,7 @@ GetGitHubVars()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_EVENT_PATH]"
exit 1
else
echo "Successfully found:[GITHUB_EVENT_PATH], value:[$GITHUB_EVENT_PATH]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_EVENT_PATH]${F[B]}, value:${F[W]}[$GITHUB_EVENT_PATH]${F[B]}"
fi
##################################################
@ -622,7 +622,7 @@ GetGitHubVars()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_ORG]"
exit 1
else
echo "Successfully found:[GITHUB_ORG], value:[$GITHUB_ORG]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_ORG]${F[B]}, value:${F[W]}[$GITHUB_ORG]${NC}"
fi
#######################
@ -638,7 +638,7 @@ GetGitHubVars()
echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[$GITHUB_REPO]"
exit 1
else
echo "Successfully found:[GITHUB_REPO], value:[$GITHUB_REPO]"
echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_REPO]${F[B]}, value:${F[W]}[$GITHUB_REPO]${NC}"
fi
fi
}
@ -679,8 +679,8 @@ function ValidatePowershellModules()
else
# Success
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
echo "Successfully found module [$VALIDATE_PSSA_MODULE] in system"
echo "Successfully found command [$VALIDATE_PSSA_CMD] in system"
echo -e "${NC}${F[B]}Successfully found module ${F[W]}[$VALIDATE_PSSA_MODULE]${F[B]} in system${NC}"
echo -e "${NC}${F[B]}Successfully found command ${F[W]}[$VALIDATE_PSSA_CMD]${F[B]} in system${NC}"
fi
fi
}

View file

@ -638,7 +638,7 @@ function LintAnsibleFiles()
########################
# No Ansible dir found #
########################
echo "WARN! No Ansible base directory found at:[$ANSIBLE_DIRECTORY]"
echo -e "${NC}${F[Y]}WARN!${NC} No Ansible base directory found at:[$ANSIBLE_DIRECTORY]"
echo "skipping ansible lint"
fi
fi