forked from openebs-archive/maya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
120 lines (107 loc) · 4.64 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
sudo: required
dist: xenial
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
jobs:
include:
- os: linux
arch: amd64
env:
- RELEASE_TAG_DOWNSTREAM=1
- os: linux
arch: arm64
env:
- RELEASE_TAG_DOWNSTREAM=0
services:
- docker
language: go
cache:
directories:
- $HOME/.cache/go-build
go:
- 1.12.16
addons:
apt:
update: true
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install --yes -qq gcc
- sudo apt-get install --yes -qq libudev-dev
install:
- make bootstrap
- make format
before_script:
# Install build/test dependencies for each platform
# Download kubectl, which is a requirement for using minikube.
# Download minikube.
# Wait for Kubernetes to be up and ready.
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/;
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.35.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/;
mkdir -p $HOME/.kube $HOME/.minikube;
touch $KUBECONFIG;
sudo minikube start --vm-driver=none --kubernetes-version=v1.13.0;
sudo chown -R travis /home/travis/.minikube/;
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done;
fi
# install zip package for arm64
- if [ "$TRAVIS_CPU_ARCH" == "arm64" ]; then
sudo apt-get install --yes zip;
fi
script:
# Verify kube-addon-manager.
# kube-addon-manager is responsible for managing other kubernetes components, such as kube-dns, dashboard, storage-provisioner.
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
kubectl cluster-info;
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lcomponent=kube-addon-manager -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-addon-manager to be available"; kubectl get pods --all-namespaces; done;
kubectl get deployment;
fi
- ./buildscripts/travis-build.sh
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
./ci/travis-ci.sh;
fi
- make deploy-images
# If this build is running due to travis release tag, and
# this job indicates to push the release downstream, then
# go ahead and tag the dependent repo.
#
# $TRAVIS_BRANCH contains the same value as $TRAVIS_TAG.
# Example: 1.9.0-RC1 tag and 1.9.0-RC1 branch.
# OpenEBS release are done from branches named as v1.9.x.
# Convert the TRAVIS_TAG to the corresponding release branch.
- if [ ! -z $TRAVIS_TAG ] && [ $RELEASE_TAG_DOWNSTREAM = 1 ] && [ "$TRAVIS_REPO_SLUG" == "openebs/maya" ]; then
REL_BRANCH=$(echo v$(echo "$TRAVIS_TAG" | cut -d'-' -f1 | rev | cut -d'.' -f2- | rev).x) ;
./buildscripts/git-release "openebs/velero-plugin" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
./buildscripts/git-release "openebs/cstor-csi" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
./buildscripts/git-release "openebs/jiva-operator" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
email:
recipients:
deploy:
provider: releases
api_key:
secure: na/NPsgDHGGRaWxRSCo5gH3TPrEutNvhEK3q2k99bbW2INe0FZ+FIPeuL9rqV8eCQi8SWJGHNFjFyMRR798RRSn8bdiK0pxJXzYvphUEH2Azzoqr65TaJHpHNTkv1WTK9OtgahT71MbmIx777U6Vd6ylyJyWja+LPhY/z66XOYQmuXR2ds7FRBlAcWg8C0KIFTLYlms5C9RKwLS2jP5C8tlJBQXMDEk7ejR1mKn3R6KQyyHICGKPGhNE+d7iMs0qhhuGIhcDwXl1olChAAITOGyWEmjc2GeUbFALo8OXdQx9qBO7saw75IzyYV/itBjE0RpuM90jKuFzKGiotSyw7Fs0KgrjHC7keuaNMqBWgKl6qoAj2a5VVEBtx8k941hRLs/VpjQ+K8wJJpjlSR8vh906b8e+HL8BKJEifF09fKBTLd0AWy9I3x6TolmRqiamvIHEkup1fZqblhhe2ZLvwuuyfl3t1FTkkon5BASgSqFdBAhR3eAD/LOtrghjaRX7wCZCzKDEaS9QLeu9UbC+bmnaOo60Gaeyp/DN5FLc4cV/vZozroesu+UEtQIrC6VDlFNYfY0V1ETKpfEQ4I8yByDHx/KjMWDyUGd8e5tm0qsD1lW1yVekh5CjQRHpzShkmKvFieeVfqVy/aGB4GrTeWSxcKiN8W0ekcgCRYut6y0=
file_glob: true
file:
- bin/maya/maya-linux_*.zip
- bin/apiserver/maya-apiserver-linux_*.zip
skip_cleanup: true
overwrite: true
on:
repo: openebs/maya
tags: true
branches:
except:
- /^*-v[0-9]/