forked from kubernetes-sigs/kui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·126 lines (113 loc) · 5.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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
- SCRIPTS="build-webpack-client.sh lint.sh typecov.sh"
LAYERS="openwhisk1 openwhisk3 grid"
MOCHA_TARGETS="webpack electron"
KUI_USE_PROXY=false
NEEDS_OPENWHISK=true
- LAYERS="openwhisk2 openwhisk4 composer1 composer2"
MOCHA_TARGETS="electron"
NEEDS_OPENWHISK=true
NEEDS_OPENWHISK_API_GATEWAY=true
NEEDS_OPENWHISK_NODEJS8=true
NEEDS_OPENWHISK_JAVA8=true
NEEDS_SECOND_OPENWHISK_AUTH=true # see plugins/plugin-openwhisk/src/test/openwhisk2/auth.ts
- 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:
- 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
- TEST_ORG=testorg
- TEST_SPACE=testspace
- CSP_ALLOWED_HOSTS="http://localhost:3000 ws://localhost:3000 http://localhost:9953"
- LOCAL_OPENWHISK=true # allows e.g. openwhisk/src/test/openwhisk1/headless to avoid trying to host set <not-local>
- NO_OPENWHISK_API_MGMT=true # no openwhisk api management support
- IGNORE_CERTS=true # apache-composer needs this, because it doesn't obey INSECURE_SSL in wskprops
- 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: SCRIPTS="build-webpack-client.sh lint.sh typecov.sh" LAYERS="openwhisk1 openwhisk3 grid" MOCHA_TARGETS="webpack electron" KUI_USE_PROXY=false NEEDS_OPENWHISK=true
- os: osx
env: LAYERS="openwhisk2 openwhisk4 composer1 composer2" MOCHA_TARGETS="electron" NEEDS_OPENWHISK=true NEEDS_OPENWHISK_API_GATEWAY=true NEEDS_OPENWHISK_NODEJS8=true NEEDS_OPENWHISK_JAVA8=true NEEDS_SECOND_OPENWHISK_AUTH=true
- 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:
- stage: npm release
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 install && npx lerna publish preminor --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 install && npx lerna publish preminor --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