Skip to content

Commit

Permalink
Big CI/CD and contributing docs rework
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Sep 30, 2019
1 parent 02027ea commit 531d6cf
Show file tree
Hide file tree
Showing 49 changed files with 1,016 additions and 809 deletions.
3 changes: 3 additions & 0 deletions .binder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# What is this folder about?

It's contains the dependency information required by [a notebook](doc/ntbk/draw_function.ipynb) that [we reference](doc/source/cost.rst) in our documentation to run on mybinder.org. All it takes is the click of [a link](http://mybinder.org/v2/gh/jupyterhub/zero-to-jupyterhub-k8s/master?filepath=doc/ntbk/draw_function.ipynb) thanks to this.
3 changes: 0 additions & 3 deletions binder/environment.yml → .binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Dependencies for the guides cloud cost estimator notebook
# http://mybinder.org/v2/gh/jupyterhub/zero-to-jupyterhub-k8s/master?filepath=doc/ntbk/draw_function.ipynb

# Need to install bqplot with conda so it calls the javascript extension.
name: bqplot
channels:
Expand Down
8 changes: 8 additions & 0 deletions .circleci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# What is this folder about?

We use CircleCI to build documentation previews for PRs, as configured through
[.circleci/config.yml], this allows us to easily preview documentation changes
in a PR in its final form before the PR is merged.

When a PR is merged [readthedocs.yml](readthedocs.yml) will help ReadTheDocs
build and publish it on https://z2jh.jupyter.org.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This CircleCI build lets us preview the documentation inside PRs before they
# are merged! And when they are, the readthedocs.yml file will help ReadTheDocs
# build and publish it on https://z2jh.jupyter.org.
version: 2
jobs:
build_docs:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
### Zero to JupyterHub Kubernetes ###
tools/templates/rendered-templates/
bin/
ci/.vagrant
.vagrant/
tools/github.sqlite
ci/daemonset-calico-node.yaml

.vscode

Expand Down
89 changes: 71 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,81 @@ language: python
python:
- 3.6
git:
## depth set to false overrides travis default behavior to use shallow clones
## with depth 50 that can cause issues
##
## ref: https://github.com/jupyterhub/chartpress#shallow-clones
##
depth: false
services:
- docker
## stages declares and orders stages
##
## ref: https://docs.travis-ci.com/user/build-stages/#build-stages-and-deployments
##
stages:
- name: lint and validate
- name: test
- name: publish
## if conditions gives us control if the stage should run
##
## ref: https://docs.travis-ci.com/user/conditions-v1
##
if: >
branch in (master) AND
type in (push)
install:
- ./ci/docker-fixes.sh
- pip3 install --no-cache-dir -r dev-requirements.txt
- . "ci/${RUNNER}-${SCENARIO}.env"
- ./ci/install-${RUNNER}.sh
script:
- ./ci/travis-script.sh
- . ci/common ci

stage: test
script:
- setup_kubectl
- setup_kind
- setup_helm
- ./ci/travis-docker-fix
- ./ci/start-k8s
- ./ci/upgrade
- ./ci/test
env:
# Different scenarios described in
# /ci/minikube-${SCENARIO}.env
matrix:
- SCENARIO=1.13-default RUNNER=minikube
- SCENARIO=1.12-netpol RUNNER=minikube
- SCENARIO=1.11-default RUNNER=minikube
- SCENARIO=1.15-default RUNNER=kind
- SCENARIO=1.14-default RUNNER=kind
- SCENARIO=1.13-default RUNNER=kind
- SCENARIO=1.12-default RUNNER=kind
global:
- secure: jpFpbMccpjGP+otWH2Z03VFdtR9AAu2vzrNxsoZ3IvJvrO4MfzYJ3uSCDQuB0NG9gBgaAscpTJtliPTEi7njXHLcsFeWXLUmeBEHLozYxfzDQzMvW3EYdNWcC7oVAAt3de0i0ojw9rGswiofhbu2dAe+Xd2bejv1+PVJcEC3SRPGy17kb6bme6gD3zty5ft4VpzP0nomUNqfZBRLUYxSZuKlHJaZ6Nuq434rKmXrcN6uy+eEWDorTbjyM22IIYgUmrhg++Qtu/MBR7/rriPhyRltCU14361bcxqyq2Hw+HNG8D3hsqo5TiEiYwxOQcXRgddL+Ci6/y0L1EvqOQc+1V8ycwNs2oNicwNgSn5A+9HpF495Kae039hGtj2Gpt4IbplSYwKFq/sFTq+CekxdD2YVQmGvsjep4bNVL66o2RSZVAW1Bg/G8/sSe3BwgD8IToy9+1NHPPuaVupeukRqNyUDcVvWH8hdb8AkXYY87+546etYDpn91GQnhTEberKbXX4UCmpKNXpXoprLE8nQLGb6TIoHPTyA+RRNQ4erDzMjqF43UVmhOZTtkGaRgIWK7vDAKpLUnuOguuhJUNpYpRggGQsMV8cZnaCumy5OFUf6i6rfN0Ru6a+/Bm7grJiAcnZlU7igaxgI38QaJgCKcqqzIImdcRYNQC74/Ok/1oM=
- secure: BK++GwKVPoS0iG8aB7wQ13daTgJR9MifHA+l9xr/tSZ3SUL6nc7kjxLbliRQJCqT9lcOODsd+v2u9PziEzBp0CCh67ftFxJw8riP2+FgdmHTK4yav9QpSwoBJHhV2SgBMGlXiqdUVC7wpgjzzK63V8abvzAhXkthWPl3kYpUI//xGYyuBNXVHEOImHB3F1M5bn90lflFtRfq2iH5FigGesMi2BFfTVeqvbzZVZrAs0E1/NRdO+/cRq0c9aRpNLkh254k1tcKbUvULQq1iLQuHN2Ramn3NgNnx93sbwp1e7ZjmETbjr9cwMIDg5mh25H0Rjf2Nn8cqHbBCWzoMkjZW097HRVDYht2kJZQIbQcaxX38DW6vykUwGWSBAWbtvCUwYwU57s/dIbSYUTQErkYYmhiq52cdOtnxZ2/ULoElCVyR8lTmQuANJrq9YFC9q1ly69YuMWWnFgwxWpK1JCgAJGELgj5EvcghEtNmkEFh5f6pmbKBE7PKQPTovzNKcdRauR/L+MsmhVYukCfNZq57LrruIQIX1GQNw9w3Ck8P4EPtNjdI4umCSy6nZSyTevWgVTmIP9EwXa5Cap32ZU+iDtw+wUBAr3sjROJOYGKlL/ktWsWbjog5hIG0rrb8PbgOfbLRZSEYGL9sYsyXXyW5oI37lB7AqG6D7vOA4TdmTQ=
## NOTE: The environment variables will be expanded to multiple jobs. For
## additional individual jobs, only the first entry is used.
##
## ref: https://docs.travis-ci.com/user/build-stages/#build-stages-and-build-matrix-expansion
##
##
## KUBE_VERSION should match a released kindest/node image tag, but they are
## currently not automatically published.
##
## ref: https://hub.docker.com/r/kindest/node/tags
## ref: https://github.com/kubernetes-sigs/kind/issues/197
##
# - KUBE_VERSION=1.16
- KUBE_VERSION=1.15.3
- KUBE_VERSION=1.14.6
- KUBE_VERSION=1.13.10
- KUBE_VERSION=1.12.10

jobs:
## include additional individual jobs
##
include:
- stage: lint and validate
script:
- setup_helm
- setup_kubeval
- python3 tools/templates/lint-and-validate.py --kubernetes-versions $LINT_KUBE_VERSIONS
env: []
- stage: publish
script:
- setup_helm
- setup_git_crypt
- ./ci/travis-docker-fix
- ./ci/publish
env:
## encrypted environment variables, used on push to master in the
## publish script to in turn decrypt a SSH key
##
## ref: https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables
- secure: jpFpbMccpjGP+otWH2Z03VFdtR9AAu2vzrNxsoZ3IvJvrO4MfzYJ3uSCDQuB0NG9gBgaAscpTJtliPTEi7njXHLcsFeWXLUmeBEHLozYxfzDQzMvW3EYdNWcC7oVAAt3de0i0ojw9rGswiofhbu2dAe+Xd2bejv1+PVJcEC3SRPGy17kb6bme6gD3zty5ft4VpzP0nomUNqfZBRLUYxSZuKlHJaZ6Nuq434rKmXrcN6uy+eEWDorTbjyM22IIYgUmrhg++Qtu/MBR7/rriPhyRltCU14361bcxqyq2Hw+HNG8D3hsqo5TiEiYwxOQcXRgddL+Ci6/y0L1EvqOQc+1V8ycwNs2oNicwNgSn5A+9HpF495Kae039hGtj2Gpt4IbplSYwKFq/sFTq+CekxdD2YVQmGvsjep4bNVL66o2RSZVAW1Bg/G8/sSe3BwgD8IToy9+1NHPPuaVupeukRqNyUDcVvWH8hdb8AkXYY87+546etYDpn91GQnhTEberKbXX4UCmpKNXpXoprLE8nQLGb6TIoHPTyA+RRNQ4erDzMjqF43UVmhOZTtkGaRgIWK7vDAKpLUnuOguuhJUNpYpRggGQsMV8cZnaCumy5OFUf6i6rfN0Ru6a+/Bm7grJiAcnZlU7igaxgI38QaJgCKcqqzIImdcRYNQC74/Ok/1oM=
- secure: BK++GwKVPoS0iG8aB7wQ13daTgJR9MifHA+l9xr/tSZ3SUL6nc7kjxLbliRQJCqT9lcOODsd+v2u9PziEzBp0CCh67ftFxJw8riP2+FgdmHTK4yav9QpSwoBJHhV2SgBMGlXiqdUVC7wpgjzzK63V8abvzAhXkthWPl3kYpUI//xGYyuBNXVHEOImHB3F1M5bn90lflFtRfq2iH5FigGesMi2BFfTVeqvbzZVZrAs0E1/NRdO+/cRq0c9aRpNLkh254k1tcKbUvULQq1iLQuHN2Ramn3NgNnx93sbwp1e7ZjmETbjr9cwMIDg5mh25H0Rjf2Nn8cqHbBCWzoMkjZW097HRVDYht2kJZQIbQcaxX38DW6vykUwGWSBAWbtvCUwYwU57s/dIbSYUTQErkYYmhiq52cdOtnxZ2/ULoElCVyR8lTmQuANJrq9YFC9q1ly69YuMWWnFgwxWpK1JCgAJGELgj5EvcghEtNmkEFh5f6pmbKBE7PKQPTovzNKcdRauR/L+MsmhVYukCfNZq57LrruIQIX1GQNw9w3Ck8P4EPtNjdI4umCSy6nZSyTevWgVTmIP9EwXa5Cap32ZU+iDtw+wUBAr3sjROJOYGKlL/ktWsWbjog5hIG0rrb8PbgOfbLRZSEYGL9sYsyXXyW5oI37lB7AqG6D7vOA4TdmTQ=
Loading

0 comments on commit 531d6cf

Please sign in to comment.