mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
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.
This commit is contained in:
parent
2238afe73b
commit
2dc5252f38
19
.travis.yml
19
.travis.yml
@ -1,13 +1,10 @@
|
||||
dist: xenial
|
||||
language: generic
|
||||
services:
|
||||
- docker
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
snaps:
|
||||
- doctl
|
||||
- docker
|
||||
- chromium
|
||||
|
||||
before_install:
|
||||
- yarn global add wait-on
|
||||
@ -33,6 +30,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
|
||||
@ -41,15 +40,13 @@ after_success:
|
||||
chmod +x tester.sh &&
|
||||
./tester.sh staging $WEBHOOK_URL;
|
||||
fi
|
||||
- ./scripts/install_kubernetes.sh
|
||||
|
||||
after_failure:
|
||||
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
||||
- 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.
@ -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",
|
||||
|
||||
@ -4,11 +4,6 @@
|
||||
# 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