Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix potential infinite loop by removing dynamic part of filename #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
image: bitnami/kubectl:1.22.2
user: root # the bitnami/kubectl image has a non-root user set by default, which does not work with the shared docker volume which is owned by root
commands:
- export KUBECONFIG=kubeconfig-$${DRONE_BUILD_STARTED}.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I guess, this variable helps to create a unique value filename on the target directory. for example, if this will create something like artifacts... It is very relevant to have. But if these configurations create such loops in exporting this file, then yet yes, it is worth re-configuring but not REMOVING.

- export KUBECONFIG=kubeconfig.yaml
- until test -f $${KUBECONFIG}; do sleep 1s; done # wait for k3d service to write the kubeconfig to the workspace
- kubectl config view
- kubectl get pods --all-namespaces
Expand All @@ -36,6 +36,6 @@ services:
- until docker ps 2>&1 > /dev/null; do sleep 1s; done # wait for docker to be ready before proceeding
- k3d cluster create --config ci/k3d-drone.yaml --api-port k3dsvc:6445 # create k3d cluster from config file
- until kubectl get deployment coredns -n kube-system -o go-template='{{.status.availableReplicas}}' | grep -v -e '<no value>'; do sleep 1s; done # wait for coredns to be up and running
- k3d kubeconfig get drone > kubeconfig-$${DRONE_BUILD_STARTED}.yaml
- k3d kubeconfig get drone > kubeconfig.yaml
- printf "@@@@@@@@@@@@@@@@@@@@@@@\n@@@@ k3d is ready! @@@@\n@@@@@@@@@@@@@@@@@@@@@@@\n"
- tail -f /dev/null # chill around while the steps do their work