Ocelot-Social/scripts/install_kubectl.sh
Robert Schäfer 2dc5252f38 Install everything on Travis CI through snap
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.
2019-04-03 18:28:50 +02:00

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