Skip to content

Commit

Permalink
Merge pull request #449 from consideRatio/pr/ci-kubernetes-client-12-…
Browse files Browse the repository at this point in the history
…testing

CI: bump to kubernetes client v12, and test k8s 1.19 also
  • Loading branch information
consideRatio committed Oct 18, 2020
2 parents defdd27 + 1900267 commit 147f260
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 30 deletions.
65 changes: 37 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ stages:
- name: publish
if: tag IS present

before_install:
# Exit immediately if a command exits with a non-zero status.
- set -e
# Minikube sais conntrack is required by k8s 1.18 and 1.19
- |
if [ "${KUBE_VERSION:2:2}" -ge "18" ]; then
sudo apt-get -q -y install conntrack;
fi
# install dependencies
install:
# Only add the --pre flag if $PRE_RELEASES is specified to test pre-releases
Expand All @@ -28,6 +37,7 @@ install:

# run tests
script:
- set -e
# flake8 runs a very quick code analysis
# without running any of the code it analyses
- flake8 kubespawner
Expand Down Expand Up @@ -56,48 +66,47 @@ jobs:
# version along for the kubernetes-client.
#
# KUBE_PY represent the version of kubernetes-client/python, and client
# version 8 supports k8s API version 1.12, and version 9 supports k8s API
# version 1.13 and so on.

- name: client:9,k8s:1.13
env: KUBE_PY=9 KUBE_VERSION=1.13.12
dist: xenial
# NOTE: TravisCI's linux kernel, has since 2020 or so, when specifying
# bionic as a distribution, made minikube fail to start a k8s 1.13
# cluster. This is why we use xenial here.
# Reference - a build failure with bionic:
# https://travis-ci.org/jupyterhub/kubespawner/jobs/642305915

- name: client:10,k8s:1.14,py:37
env: KUBE_PY=10 KUBE_VERSION=1.14.0
# version 10 supports k8s API version 1.14, and version 1 supports k8s API
# version 1.15 and so on.
#
# client 10 -> k8s 1.14.10
# client 11 -> k8s 1.15.12
# client 12 -> k8s 1.16.15
# client 13 -> k8s 1.17.13 (client 13 isn't released)
#
# For the latest k8s versions, see:
# https://github.com/kubernetes/sig-release/blob/master/releases/patch-releases.md

- name: client:10,k8s:1.14,py:38
env: KUBE_PY=10 KUBE_VERSION=1.14.10

- name: client:11,k8s:1.15,py:37
env: KUBE_PY=11 KUBE_VERSION=1.15.12
python: 3.7

- name: client:11,k8s:1.15,py:36
env: &latest_supported KUBE_PY=11 KUBE_VERSION=1.15.12
- name: client:12,k8s:1.16,py:36
env: &latest_supported KUBE_PY=12 KUBE_VERSION=1.16.15
python: 3.6

- name: client:11,k8s:1.15,jupyterhub:master
env: KUBE_PY=11 KUBE_VERSION=1.15.12 JUPYTERHUB_MASTER=TRUE

- name: client:11,k8s:1.18
env: KUBE_PY=11 KUBE_VERSION=1.18.6
before_install:
# This is required by k8s 1.18 according to minikube error message
# trying to install k8s 1.18 without it.
- sudo apt-get -q -y install conntrack
- name: client:12,k8s:1.16,jupyterhub:master
env: KUBE_PY=12 KUBE_VERSION=1.16.15 JUPYTERHUB_MASTER=TRUE

- name: client:12,k8s:1.19
env: KUBE_PY=12 KUBE_VERSION=1.19.2

# Allowed failure tests:
# ----------------------

# 1. Test with pre-releases of kubernetes-client/python and other
# python dependencies
- &allowed_failure_1
name: client:pre-release,k8s:1.16 - allowed failure
env: PRE_RELEASES=TRUE KUBE_VERSION=1.16.13
name: client:pre-release,k8s:1.17 - allowed failure
env: PRE_RELEASES=TRUE KUBE_VERSION=1.17.12

# 2. Test with a nightly python build using latest known
# supported configuration.
- &allowed_failure_2
name: client:11,k8s:1.15,python:nightly - allowed failure
name: client:12,k8s:1.16,python:nightly - allowed failure
python: nightly
env: *latest_supported

Expand Down
4 changes: 2 additions & 2 deletions ci/minikube.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# default values for relevant environment variables

# ref: https://github.com/kubernetes/kubernetes/releases
export KUBE_VERSION=${KUBE_VERSION:-1.18.6}
export KUBE_VERSION=${KUBE_VERSION:-1.19.2}

# ref: https://github.com/kubernetes/minikube/releases
export MINIKUBE_VERSION=${MINIKUBE_VERSION:-1.12.0}
export MINIKUBE_VERSION=${MINIKUBE_VERSION:-1.14.0}

# ref: https://github.com/LiliC/travis-minikube/blob/master/.travis.yml
export CHANGE_MINIKUBE_NONE_USER=true
Expand Down

0 comments on commit 147f260

Please sign in to comment.