Skip to content

Commit

Permalink
Merge pull request jupyterhub#1175 from consideRatio/restructure-for-dx
Browse files Browse the repository at this point in the history
Restructure for DX (Developer Experience)
  • Loading branch information
minrk authored Mar 28, 2019
2 parents 3901dfb + 633a5b4 commit 8ed2f81
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 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
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
dist: xenial
language: python
python:
- 3.6
- 3.6
git:
depth: false
services:
- docker
- docker
install:
- pip3 install --no-cache-dir -r dev-requirements.txt
- . "ci/minikube-${SCENARIO}.env"
- ./ci/install.sh
- pip3 install --no-cache-dir -r dev-requirements.txt
- . "ci/minikube-${SCENARIO}.env"
- ./ci/install.sh
script:
- ./ci/travis-script.sh
- ./ci/travis-script.sh

env:
# Different scenarios described in
Expand All @@ -21,5 +21,5 @@ env:
- SCENARIO=1.12-netpol
- SCENARIO=1.11-default
global:
- secure: jpFpbMccpjGP+otWH2Z03VFdtR9AAu2vzrNxsoZ3IvJvrO4MfzYJ3uSCDQuB0NG9gBgaAscpTJtliPTEi7njXHLcsFeWXLUmeBEHLozYxfzDQzMvW3EYdNWcC7oVAAt3de0i0ojw9rGswiofhbu2dAe+Xd2bejv1+PVJcEC3SRPGy17kb6bme6gD3zty5ft4VpzP0nomUNqfZBRLUYxSZuKlHJaZ6Nuq434rKmXrcN6uy+eEWDorTbjyM22IIYgUmrhg++Qtu/MBR7/rriPhyRltCU14361bcxqyq2Hw+HNG8D3hsqo5TiEiYwxOQcXRgddL+Ci6/y0L1EvqOQc+1V8ycwNs2oNicwNgSn5A+9HpF495Kae039hGtj2Gpt4IbplSYwKF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zNKcdRauR/L+MsmhVYukCfNZq57LrruIQIX1GQNw9w3Ck8P4EPtNjdI4umCSy6nZSyTevWgVTmIP9EwXa5Cap32ZU+iDtw+wUBAr3sjROJOYGKlL/ktWsWbjog5hIG0rrb8PbgOfbLRZSEYGL9sYsyXXyW5oI37lB7AqG6D7vOA4TdmTQ=
3 changes: 3 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 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
9 changes: 0 additions & 9 deletions ci/deploy.sh

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion ci/minikube-1.11-default.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export Z2JH_HELM_ARGS="-f minikube-config.yaml"
export DISABLE_TEST_NETPOL=1
export INSTALL_CALICO=0

export RUN_DEPLOY_SCRIPT=0
export RUN_PUBLISH_SCRIPT=0

# FIXME: Issue 1123
export CRICTL_VERSION=1.11.1
2 changes: 1 addition & 1 deletion ci/minikube-1.12-netpol.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export Z2JH_HELM_ARGS="-f minikube-config.yaml -f minikube-netpol.yaml"
export DISABLE_TEST_NETPOL=0
export INSTALL_CALICO=1

export RUN_DEPLOY_SCRIPT=0
export RUN_PUBLISH_SCRIPT=0
2 changes: 1 addition & 1 deletion ci/minikube-1.13-default.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export Z2JH_HELM_ARGS="-f minikube-config.yaml"
export DISABLE_TEST_NETPOL=1
export INSTALL_CALICO=0

export RUN_DEPLOY_SCRIPT=1
export RUN_PUBLISH_SCRIPT=1
23 changes: 23 additions & 0 deletions ci/publish-chart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -eu

# Decrypt a private SSH key having its public key registered on GitHub. It will
# be used to establish an identity with rights to push to the repo hosting our
# Helm charts: https://github.com/jupyterhub/helm-chart
openssl aes-256-cbc -K $encrypted_c6b45058ffe8_key -iv $encrypted_c6b45058ffe8_iv -in ci/id_rsa.enc -out ci/id_rsa -d
chmod 0400 ci/id_rsa

docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"

# Activate logging of bash commands now that the sensitive stuff is done
set -x

# As chartpress uses git to push to our Helm chart repository, we configure
# git ahead of time to use the identity we decrypted earlier.
export GIT_SSH_COMMAND="ssh -i ${PWD}/ci/id_rsa"

chartpress --commit-range "${TRAVIS_COMMIT_RANGE}" --push --publish-chart

# Let us log the changes chartpress did, it should include replacements for
# fields in values.yaml, such as what tag for various images we are using.
git diff
4 changes: 2 additions & 2 deletions ci/travis-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ python3 tools/templates/lint-and-validate.py
if [[
"$TRAVIS_BRANCH" == "master" &&
"$TRAVIS_PULL_REQUEST" == "false" &&
"$RUN_DEPLOY_SCRIPT" == "1"
"$RUN_PUBLISH_SCRIPT" == "1"
]]; then
./ci/deploy.sh
./ci/publish-chart.sh
else
chartpress --commit-range ${TRAVIS_COMMIT_RANGE}
fi
Expand Down

0 comments on commit 8ed2f81

Please sign in to comment.