Skip to content

Instantly share code, notes, and snippets.

@kevinawoo
Created October 27, 2017 20:50
Show Gist options
  • Save kevinawoo/1fb8db8d54918ad05dc2b328481fd77c to your computer and use it in GitHub Desktop.
Save kevinawoo/1fb8db8d54918ad05dc2b328481fd77c to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
root=$PWD
# This loads NVM
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh
[[ -s /usr/local/opt/nvm/nvm.sh ]] && . "/usr/local/opt/nvm/nvm.sh"
# optionally, you can just have node v7 installed without nvm. if so, remove this
command -v nvm > /dev/null || { echo "we need nvm to use node v7"; exit 1; }
command -v yarn > /dev/null || { echo "we need yarn"; exit 1; }
nvm use v7
set -x
## cleanup
cd deck-customized && \
yarn unlink || true
cd deck/app/scripts/modules/kubernetes && \
yarn unlink || true
cd $root
rm -rf deck deck-customized || true
# build the modules locally
# https://github.com/spinnaker/deck/compare/master...armory-io:feature/convert-kubernetes-to-module
cd $root
git clone https://github.com/armory-io/deck.git --branch feature/convert-kubernetes-to-module
cd deck
yarn install
cd $root/deck/app/scripts/modules/core && yarn lib
cd $root/deck/app/scripts/modules/amazon && yarn lib
cd $root/deck/app/scripts/modules/docker && yarn lib
cd $root/deck/app/scripts/modules/google && yarn lib
cd $root/deck/app/scripts/modules/kubernetes && yarn lib && yarn link # build and allow linking to the module
# run deck customized version with the new module
# https://github.com/spinnaker/deck-customized/compare/master...armory-io:feature/add-kubernetes-module
cd $root
git clone https://github.com/armory-io/deck-customized.git --branch feature/add-kubernetes-module
cd deck-customized
yarn install
yarn link "@spinnaker/kubernetes"
# CHANGE YOUR SPINNAKER HOST HERE
# when its finished building (when you see "webpack: Compiled successfully.")
# visit http://localhost:9000
API_HOST=http://spinnaker.dev.armory.io:8084 yarn start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment