forked from kubernetes-retired/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
106 lines (94 loc) · 3.19 KB
/
Copy path.travis.yml
File metadata and controls
106 lines (94 loc) · 3.19 KB
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
# Travis continuous integration system configuration file.
# Read more follows:
# * https://docs.travis-ci.com/user/customizing-the-build/
# * https://docs.travis-ci.com/user/reference/bionic/
# * https://docs.travis-ci.com/user/installing-dependencies/
# * https://docs.travis-ci.com/user/firefox/
# * https://config.travis-ci.com/ref/job/addons/apt
sudo: required
dist: bionic
language: node_js
node_js: 12.16.0
addons:
firefox: "latest"
apt:
packages:
- google-chrome
sources:
- google-chrome-stable
update: true
git:
depth: 500
quiet: true
cache:
directories:
- .cached_tools
- ~/.cache
- node_modules
before_install:
- export NG_CLI_ANALYTICS=ci
- export DOCKER_CLI_EXPERIMENTAL=enabled
- export GO111MODULE=on
- export GOPROXY=https://proxy.golang.org
- export PATH=$PATH:$GOPATH/bin
- export NODE_OPTIONS=--max-old-space-size=8192
- eval "$(gimme 1.13.9)"
# `npm ci` will run between `before_install` and `before_script`.
before_script:
- echo "Recheck versions before job."
- go version
- docker --version
- google-chrome-stable --version
- firefox --version
jobs:
include:
- stage: test
name: "Code check & linting"
before_script:
- aio/scripts/install-codegen.sh
script: npm run check
- name: "Unit tests"
script: npm run test:coverage
after_success:
- rm -rf $TRAVIS_BUILD_DIR/.tmp
- bash <(curl -s https://codecov.io/bash)
- name: "Helm linting"
cache: false
install:
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- wget https://github.com/garethr/kubeval/releases/download/0.14.0/kubeval-linux-amd64.tar.gz
- mkdir kubeval
- tar xf kubeval-linux-amd64.tar.gz -C kubeval
- export PATH="$PATH:$(pwd)/kubeval"
before_script: skip # We don't need Docker nor Go
script:
- aio/scripts/helm-lint.sh
- name: "e2e tests"
script: npm run cluster:start && npm run e2e
- stage: deploy
name: "Development release"
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- npm run docker:push:head
- stage: release
name: "Release"
script:
- docker login -u $DOCKER_RELEASE_USER -p $DOCKER_RELEASE_PASS
- npm run docker:push
# Manual step for now since it requires to add a GitHub Token to Travis which would be a security issue
# - name: "Helm repository generation"
# cache: false
# install:
# - curl -L https://git.io/get_helm.sh | bash && helm init --skip-refresh --client-only
# - git remote set-branches origin '*' && git fetch --unshallow
# # GTHUB_WRITE_TOKEN is a travis secret variable that is generated from https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
# - git remote set-url origin https://x-access-token:${GITHUB_WRITE_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
# before_script: skip # We don't need Docker nor Go
# script:
# - sh ./aio/scripts/
stages:
- test
- name: deploy
if: branch = master AND type != pull_request
- name: release
if: tag IS present AND type != pull_request