mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #380 from Human-Connection/344_fix_expired_kubeconfig
Setup kubectl so it never expires
This commit is contained in:
commit
83ad821bea
18
.travis.yml
18
.travis.yml
@ -1,13 +1,14 @@
|
|||||||
|
dist: xenial
|
||||||
language: generic
|
language: generic
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
addons:
|
addons:
|
||||||
chrome: stable
|
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- google-chrome
|
|
||||||
packages:
|
packages:
|
||||||
- google-chrome-stable
|
- libgconf-2-4
|
||||||
|
snaps:
|
||||||
|
- doctl
|
||||||
|
- docker
|
||||||
|
- chromium
|
||||||
|
- 'kubectl --classic'
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- yarn global add wait-on
|
- yarn global add wait-on
|
||||||
@ -33,6 +34,8 @@ script:
|
|||||||
- yarn run cypress:run --record --key $CYPRESS_TOKEN
|
- yarn run cypress:run --record --key $CYPRESS_TOKEN
|
||||||
|
|
||||||
after_success:
|
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
|
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
||||||
- chmod +x send.sh
|
- chmod +x send.sh
|
||||||
- ./send.sh success $WEBHOOK_URL
|
- ./send.sh success $WEBHOOK_URL
|
||||||
@ -47,9 +50,6 @@ after_failure:
|
|||||||
- chmod +x send.sh
|
- chmod +x send.sh
|
||||||
- ./send.sh failure $WEBHOOK_URL
|
- ./send.sh failure $WEBHOOK_URL
|
||||||
|
|
||||||
before_deploy:
|
|
||||||
- ./scripts/setup_kubernetes.sh
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: script
|
- provider: script
|
||||||
script: scripts/docker_push.sh
|
script: scripts/docker_push.sh
|
||||||
|
|||||||
Binary file not shown.
@ -8,8 +8,8 @@
|
|||||||
"nonGlobalStepDefinitions": true
|
"nonGlobalStepDefinitions": true
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cypress:run": "cypress run --browser chrome",
|
"cypress:run": "cypress run --browser chromium",
|
||||||
"cypress:open": "cypress open --browser chrome"
|
"cypress:open": "cypress open --browser chromium"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "^3.2.0",
|
"cypress": "^3.2.0",
|
||||||
|
|||||||
@ -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
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user