mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
This commit should setup kubectl in a way that it downloads a recent `kubeconfig` from Digitial Ocean with `doctl`. Thus, deployments will not fail after a kubeconfig has expired. Since it seems to be the recommended way to install `doctl` through [Snap](https://snapcraft.io/). I decided to install everything else through snap too, including chrome and docker.
11 lines
418 B
Bash
Executable File
11 lines
418 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script can be called multiple times for each `before_deploy` hook
|
|
# so let's exit successfully if kubectl is already installed:
|
|
command -v kubectl && exit 0
|
|
|
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
|
chmod +x ./kubectl
|
|
sudo mv ./kubectl /usr/local/bin/kubectl
|
|
|