Skip to content

Commit

Permalink
script output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnrobinson committed Dec 14, 2021
1 parent 394296f commit 942d3aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tekton/overlays/secrets/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ class bcolors:
print(pystache.render(input, {"literals": literals, "ssh": ssh, "docker": docker}))
sys.stdout = original_stdout

print(bcolors.OKCYAN + "Completed..." + bcolors.ENDC)
print(bcolors.OKGREEN + "Completed..." + bcolors.ENDC)
7 changes: 4 additions & 3 deletions tekton/tekton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ export normal=$(tput sgr0)

function apply(){
secrets
echo "${cyan}Applying Tekton resources...${normal}"
if [ -z "${CONTEXT}" ]; then
kubectl apply -k overlays/apply || prune
else
kubectl config use-context ${CONTEXT}
kubectl apply -k overlays/apply || prune
fi
echo "${green}Apply completed successfully...${normal}"
echo "${green}Completed...${normal}"
}

function secrets(){
pip install -r ${DIR}/overlays/secrets/requirements.txt --exists-action i --quiet
python ${DIR}/overlays/secrets/main.py

echo "${green}Deploying secrets...${normal}"
echo "${cyan}Applying secrets...${normal}"
if [ -z "${CONTEXT}" ]; then
kubectl apply -k overlays/secrets
else
Expand All @@ -36,7 +37,7 @@ function secrets(){

rm -rf overlays/secrets/kustomization.yaml
rm -rf overlays/secrets/.secrets
echo "${green}Secrets configured successfully...${normal}"
echo "${green}completed...${normal}"
}

function prune(){
Expand Down

0 comments on commit 942d3aa

Please sign in to comment.