This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
82 lines (70 loc) · 2.3 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
language: go
go:
- 1.13
cache:
directories:
- $GOPATH/pkg/mod
env:
- GO111MODULE=on
services:
- docker
stages:
- name: Lint
if: type = pull_request
- name: Test and Build
if: type = pull_request
- name: Push
if: type = push AND branch = master
jobs:
include:
- stage: Lint
name: Go
install: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0
script: golangci-lint --deadline=5m run -D errcheck -E goimports -E interfacer -E scopelint ./...
- stage: Lint
name: Helm
install:
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
- chmod 700 get_helm.sh && sudo ./get_helm.sh
script:
- helm init --client-only
- helm lint deploy/ship-it
- helm lint deploy/localstack
- stage: Test and Build
name: Go
script:
- go test -race ./...
- TARGET=ship-it-api make build
- TARGET=ship-it-syncd make build
- stage: Test and Build
name: Operator
before_script:
- curl -sL https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.0.8/kubebuilder_1.0.8_linux_amd64.tar.gz | tar -xz -C /tmp/
- sudo mv /tmp/kubebuilder_1.0.8_linux_amd64 /usr/local/kubebuilder
- export PATH=$PATH:/usr/local/kubebuilder/bin
- cd operator
script:
- make test
- make docker-build
- stage: Test and Build
name: JavaScript
script: cd web && npm install -D && npm run lint && npm run test
- stage: Push
name: Push
install: pip install --user awscli
before_script:
- export PATH=$PATH:$HOME/.local/bin
- eval $(aws ecr get-login --no-include-email --region us-east-1)
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
- chmod 700 get_helm.sh && sudo ./get_helm.sh
- helm init --client-only
- helm plugin install https://github.com/hypnoglow/helm-s3.git
script:
- helm repo add wattpad s3://charts.wattpadhq.com
- make chart || true
- TARGET=ship-it-api make push
- TARGET=ship-it-syncd make push
- cd operator && make docker-push
branches:
only:
- master