Merge pull request #380 from Human-Connection/344_fix_expired_kubeconfig

Setup kubectl so it never expires
This commit is contained in:
Robert Schäfer 2019-04-04 10:56:35 +02:00 committed by GitHub
commit 83ad821bea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 26 deletions

View File

@ -1,13 +1,14 @@
dist: xenial
language: generic
services:
- docker
addons:
chrome: stable
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- libgconf-2-4
snaps:
- doctl
- docker
- chromium
- 'kubectl --classic'
before_install:
- yarn global add wait-on
@ -33,6 +34,8 @@ script:
- yarn run cypress:run --record --key $CYPRESS_TOKEN
after_success:
- doctl auth init --access-token $DOCTL_ACCESS_TOKEN
- doctl kubernetes cluster kubeconfig show nitro-staging > ~/.kube/config.yaml
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
@ -47,9 +50,6 @@ after_failure:
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
before_deploy:
- ./scripts/setup_kubernetes.sh
deploy:
- provider: script
script: scripts/docker_push.sh

Binary file not shown.

View File

@ -8,8 +8,8 @@
"nonGlobalStepDefinitions": true
},
"scripts": {
"cypress:run": "cypress run --browser chrome",
"cypress:open": "cypress open --browser chrome"
"cypress:run": "cypress run --browser chromium",
"cypress:open": "cypress open --browser chromium"
},
"devDependencies": {
"cypress": "^3.2.0",

View File

@ -1,15 +0,0 @@
#!/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
openssl aes-256-cbc -K $encrypted_44f54ef0bc46_key -iv $encrypted_44f54ef0bc46_iv -in kubeconfig.yaml.enc -out kubeconfig.yaml -d
mkdir ${HOME}/.kube
cp kubeconfig.yaml ${HOME}/.kube/config
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