kui-shell
Version:
This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool
128 lines (114 loc) • 5.53 kB
YAML
language: node_js
node_js: 8
dist: xenial # Note: dist>=xenial required by microk8s
cache: false # as of 20190709 trav-ci.org started loading garbage from the build cache
services:
- docker
os:
- linux
- osx
env:
matrix:
- WAIT_LAYERS="bash-like-wait"
LAYERS="core bash-like core-support editor"
MOCHA_TARGETS="webpack electron"
KUI_USE_PROXY=true
NEEDS_IBMCLOUD_CLI=true # see plugins/plugin-bash-like/src/test/bash-like/bash-like.ts
- LAYERS="response"
MOCHA_TARGETS="electron"
KUI_USE_CLIENT=test
- LAYERS="core"
MOCHA_TARGETS="electron"
KUI_USE_CLIENT=base
LINUX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-linux-x64/Kui"
OSX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-darwin-x64/Kui.app/Contents/MacOS/Kui"
TEST_FROM_BUILD=`[ "$TRAVIS_OS_NAME" == linux ] && echo "$LINUX_BASE_BUILD" || echo "$OSX_BASE_BUILD"`
- WAIT_LAYERS="k8s"
LAYERS="k8s1 k8s2"
MOCHA_TARGETS="electron"
NEEDS_KUBERNETES=true
NEEDS_HELM=true
TIMEOUT=100000
- LAYERS="HEADLESS k8s1 k8s2"
KUI_USE_PROXY=true
MOCHA_TARGETS="webpack"
NEEDS_KUBERNETES=true
NEEDS_HELM=true
NEEDS_HEADLESS=true
TIMEOUT=100000
global:
- NYC=true # we want code coverage stats
- TRAVIS_KUBE_VERSION=1.12
- TRAVIS_HELM_VERSION=2.13.0
- NEEDS_TOP=true # uncomment this if you want cpu and memory utilization output
- WEBPACK_CLIENT_URL="http://localhost:9080/"
- WEBPACK_POLL_INTERVAL=200000 # no need to poll for updates while testing
- WEB_COMPRESS=none
- RUNNING_KUI_TEST=true
- KUI_USE_HTTP=true
- CSP_ALLOWED_HOSTS="http://localhost:3000 ws://localhost:3000 http://localhost:9953"
- PATH=bin:$PATH
- NO_MAC_DMG_INSTALLER=`[[ "$TRAVIS_OS_NAME" == linux ]] && echo true` # we can't build macOS DMG files in linux travis :(
- WINDOW_WIDTH=1400 # ! important ! so that clicks don't fail due to elements being off-viewport
- WINDOW_HEIGHT=1050 # ! ibid !
- LINUX_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-linux-x64/Kui" # test against linux electron build
- OSX_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-darwin-x64/Kui.app/Contents/MacOS/Kui" # test against darwin electron build
- TEST_FROM_BUILD=`[ "$TRAVIS_OS_NAME" == linux ] && echo "$LINUX_BUILD" || echo "$OSX_BUILD"`
- BUILD_ENV=production # please note: used in dist/electron/build.sh with npm prune --production
- HOMEBREW_NO_AUTO_UPDATE=1 # disable auto update before running brew install, brew upgrade or brew tap
# to save some time in the runs, exclude layers that are not currently
# compatible with osx; the travis method for this is a bit clumsy: we
# have to repeat the entire env!
matrix:
exclude:
- os: osx
env: LAYERS="core" MOCHA_TARGETS="electron" KUI_USE_CLIENT=base LINUX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-linux-x64/Kui" OSX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-darwin-x64/Kui.app/Contents/MacOS/Kui" TEST_FROM_BUILD=`[ "$TRAVIS_OS_NAME" == linux ] && echo "$LINUX_BASE_BUILD" || echo "$OSX_BASE_BUILD"`
- os: osx
env: LAYERS="response" MOCHA_TARGETS="electron" KUI_USE_CLIENT=test
- os: osx
env: WAIT_LAYERS="k8s" LAYERS="k8s1 k8s2" MOCHA_TARGETS="electron" NEEDS_KUBERNETES=true NEEDS_HELM=true TIMEOUT=100000
- os: osx
env: LAYERS="HEADLESS k8s1 k8s2" KUI_USE_PROXY=true MOCHA_TARGETS="webpack" NEEDS_KUBERNETES=true NEEDS_HELM=true NEEDS_HEADLESS=true TIMEOUT=100000
install: ./tools/travis/test/install.sh
script: ./tools/travis/test/script.sh
after_success: ./tools/travis/publishers/cos.sh
jobs:
include:
# Notes:
#
# re: on the `npm ci` and `npm install -g` below: here, we are
# trying to avoid contamination of package-lock.json, because
# lerna will refuse to publish if it finds uncommitted changes
#
# re: git fetch --depth=1000 see https://github.com/IBM/kui/issues/2924
#
- stage: npm
env: ""
node_js: "8"
script:
- echo "NPM Deploying Started ..."
- echo "Repo name:$TRAVIS_REPO_SLUG"
- echo "Branch name:$TRAVIS_BRANCH"
- echo "TRAVIS EVENT TYPE:$TRAVIS_EVENT_TYPE"
before_deploy:
- echo "//registry.npmjs.org/:_authToken=${NPMJS_API_KEY}" > ~/.npmrc
deploy:
- provider: script
script: npm ci && npm install -g lerna && git fetch --depth=1000 && git status && git diff && lerna publish prepatch --no-git-tag-version --no-push --canary --yes --dist-tag dev --preid dev.$TRAVIS_BUILD_NUMBER
skip_cleanup: true
keep_history: true
on:
branch: master
repo: IBM/kui
condition: $TRAVIS_EVENT_TYPE = push
- provider: script
script: npm ci && npm install -g lerna && git fetch --depth=1000 && git status && git diff && lerna publish prepatch --no-git-tag-version --no-push --canary --yes --dist-tag nightly --preid nightly.$TRAVIS_BUILD_NUMBER
skip_cleanup: true
keep_history: true
on:
branch: master
repo: IBM/kui
condition: $TRAVIS_EVENT_TYPE = cron
notifications:
webhooks:
- https://openwhisk.ng.bluemix.net/api/v1/web/nickm_production/travis-for-kui/done.json