forked from volcano-sh/volcano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (74 loc) · 2.65 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
dist: xenial
language: go
go:
- '1.13.x'
sudo: required
env:
- HOME=/home/travis
services:
- docker
go_import_path: volcano.sh/volcano
jobs:
include:
- stage: Golint & Gofmt
before_script:
- go get -u golang.org/x/lint/golint
script:
- make verify
- stage: Verify Deployment Yaml
script:
- echo "Verifying contents of installer/development.yaml with generated yaml"
- make TAG=latest generate-yaml
- make verify-generated-yaml
- stage: UT Tests
script:
- make unit-test
- stage: E2E Tests
before_script:
# Download kubectl
- sudo apt-get update && sudo apt-get install -y apt-transport-https
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
# Download kind binary (0.5.0)
- sudo curl -o /usr/local/bin/kind -L https://github.com/kubernetes-sigs/kind/releases/download/v0.5.0/kind-linux-amd64
- sudo chmod +x /usr/local/bin/kind
script:
- make vcctl
- make images
- make e2e-test-kind
after_failure:
# Echo logs and upload
- test -f helm-tiller.log && "echo ******<<helm tiller service logs>>******" && cat helm-tiller.log
- test -f volcano-admission.log && echo "******<<admission logs>>******" && cat volcano-admission.log
- test -f volcano-controller.log && echo "******<<controller logs>>******" && cat volcano-controller.log
- test -f volcano-scheduler.log && echo "******<<scheduler logs>>******" && cat volcano-scheduler.log
- stage: Publish release
before_deploy:
- export TRAVIS_TAG=$(git describe --tags)
script:
- echo "publish release to github & dockerhub"
deploy:
- provider: script
script: make TAG=${TRAVIS_TAG} RELEASE_VER=${TRAVIS_TAG} release
on:
tags: true
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: _output/release/volcano-${TRAVIS_TAG}-${OSTYPE}.tar.gz
skip_cleanup: true
on:
tags: true
- stage: Publish latest Docker Image on Daily Build
script:
- echo "Publish latest Docker Images to DockerHub"
deploy:
- provider: script
script: make TAG=latest RELEASE_VER=latest release
on:
condition: $TRAVIS_EVENT_TYPE = cron
notifications:
webhooks: https://www.travisbuddy.com/
on_success: never