From 342f5508843a4cefde9d9e49681f0b9e8f03a2a5 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 5 Jul 2021 14:44:44 -0400 Subject: [PATCH 1/8] autodeploy notebooks: allow all customizations in env.local Set WORKFLOW_TESTS_BRANCH and any other notebook deploy config like PAVICS_LANDING_BRANCH in env.local. --- birdhouse/deployment/trigger-deploy-notebook | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/birdhouse/deployment/trigger-deploy-notebook b/birdhouse/deployment/trigger-deploy-notebook index b53612c99..9b14abcaa 100755 --- a/birdhouse/deployment/trigger-deploy-notebook +++ b/birdhouse/deployment/trigger-deploy-notebook @@ -12,18 +12,20 @@ # # Logs to /var/log/PAVICS/notebookdeploy.log, re-use existing logrotate. -if [ -z "$JUPYTERHUB_USER_DATA_DIR" ]; then - # running script manually (not with cron) source env.local file. - COMPOSE_DIR="$(dirname -- "$(dirname -- "$(realpath "$0")")")" - . "$COMPOSE_DIR/default.env" # default JUPYTERHUB_USER_DATA_DIR - if [ -e "$COMPOSE_DIR/env.local" ]; then - . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR - fi -fi - LOG_FILE="/var/log/PAVICS/notebookdeploy.log" exec >>$LOG_FILE 2>&1 +# running script manually (not with cron) source env.local file. +if [ -z "$COMPOSE_DIR" ]; then + COMPOSE_DIR="$(dirname -- "$(dirname -- "$(realpath "$0")")")" +fi +if [ -e "$COMPOSE_DIR/default.env" ]; then + . "$COMPOSE_DIR/default.env" # default JUPYTERHUB_USER_DATA_DIR +fi +if [ -e "$COMPOSE_DIR/env.local" ]; then + . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR +fi + cleanup_on_exit() { rm -rf "$TMPDIR" set +x From 01bf678fb5f6c0dacd579985313dcc2c331c6828 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 5 Jul 2021 15:00:03 -0400 Subject: [PATCH 2/8] autodeploy notebooks: add customization code to logging as well --- birdhouse/deployment/trigger-deploy-notebook | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/birdhouse/deployment/trigger-deploy-notebook b/birdhouse/deployment/trigger-deploy-notebook index 9b14abcaa..a0ed5b0d5 100755 --- a/birdhouse/deployment/trigger-deploy-notebook +++ b/birdhouse/deployment/trigger-deploy-notebook @@ -15,6 +15,22 @@ LOG_FILE="/var/log/PAVICS/notebookdeploy.log" exec >>$LOG_FILE 2>&1 +cleanup_on_exit() { + rm -rf "$TMPDIR" + set +x + echo " +notebookdeploy finished START_TIME=$START_TIME +notebookdeploy finished END_TIME=`date -Isecond`" +} + +trap cleanup_on_exit EXIT + +START_TIME="`date -Isecond`" +echo "========== +notebookdeploy START_TIME=$START_TIME" + +set -x + # running script manually (not with cron) source env.local file. if [ -z "$COMPOSE_DIR" ]; then COMPOSE_DIR="$(dirname -- "$(dirname -- "$(realpath "$0")")")" @@ -26,16 +42,6 @@ if [ -e "$COMPOSE_DIR/env.local" ]; then . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR fi -cleanup_on_exit() { - rm -rf "$TMPDIR" - set +x - echo " -notebookdeploy finished START_TIME=$START_TIME -notebookdeploy finished END_TIME=`date -Isecond`" -} - -trap cleanup_on_exit EXIT - NOTEBOOK_DIR_MNT="/notebook_dir" TUTORIAL_NOTEBOOKS_DIR="tutorial-notebooks" if [ -z "$WORKFLOW_TESTS_BRANCH" ]; then @@ -47,12 +53,6 @@ if [ -z "$TMP_BASE_DIR" ]; then TMP_BASE_DIR="/tmp" fi -START_TIME="`date -Isecond`" -echo "========== -notebookdeploy START_TIME=$START_TIME" - -set -x - TMPDIR="`mktemp -d -t notebookdeploy.XXXXXXXXXXXX -p $TMP_BASE_DIR`" cd $TMPDIR From ada389f708b7771d23b4a67406a8dbef73e2aa1d Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 5 Jul 2021 15:24:12 -0400 Subject: [PATCH 3/8] autodeploy notebooks: do not leak password in logs --- birdhouse/deployment/trigger-deploy-notebook | 2 ++ 1 file changed, 2 insertions(+) diff --git a/birdhouse/deployment/trigger-deploy-notebook b/birdhouse/deployment/trigger-deploy-notebook index a0ed5b0d5..d9abd6b53 100755 --- a/birdhouse/deployment/trigger-deploy-notebook +++ b/birdhouse/deployment/trigger-deploy-notebook @@ -39,7 +39,9 @@ if [ -e "$COMPOSE_DIR/default.env" ]; then . "$COMPOSE_DIR/default.env" # default JUPYTERHUB_USER_DATA_DIR fi if [ -e "$COMPOSE_DIR/env.local" ]; then + set +x # do not leak password in logs . "$COMPOSE_DIR/env.local" # optional override JUPYTERHUB_USER_DATA_DIR + set -x fi NOTEBOOK_DIR_MNT="/notebook_dir" From 6e5f1353c39a6ec804a7e7b8726bac4bdd7f6c11 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 5 Jul 2021 18:14:44 -0400 Subject: [PATCH 4/8] autodeploy notebooks: update changelog --- CHANGES.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0cb03c867..ef2e1cc25 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,13 @@ [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ -[//]: # (list changes here, using '-' for each new entry, remove this when items are added) + ### Changes + + - Notebook deployment: allow to specify required branch for any tutorial + notebook repos in `env.local`. + + Examaple: set `WORKFLOW_TESTS_BRANCH` and any other + notebook deploy config like `PAVICS_LANDING_BRANCH` in `env.local`. [1.13.10](https://github.com/bird-house/birdhouse-deploy/tree/1.13.10) (2021-06-30) ------------------------------------------------------------------------------------------------------------------ From b47641db895b9f27e34a9e1c9fd13bb9be3f3588 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 6 Jul 2021 10:14:40 -0400 Subject: [PATCH 5/8] jupyter: minor update to add unzip package unzip needed to test PAVICS-landing notebooks under Jenkins. No other packages update. See PR https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/79 for more details. --- CHANGES.md | 12 ++++++++++++ birdhouse/default.env | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ef2e1cc25..ce4df5242 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,18 @@ Examaple: set `WORKFLOW_TESTS_BRANCH` and any other notebook deploy config like `PAVICS_LANDING_BRANCH` in `env.local`. + To support testing of this PR + https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/79. + + - jupyter: minor update to add `unzip` package + + `unzip` needed to test PAVICS-landing notebooks under Jenkins. No other + package updates. + + See PR + https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/79 + for more details. + [1.13.10](https://github.com/bird-house/birdhouse-deploy/tree/1.13.10) (2021-06-30) ------------------------------------------------------------------------------------------------------------------ diff --git a/birdhouse/default.env b/birdhouse/default.env index d6375ff9d..78e5323ee 100644 --- a/birdhouse/default.env +++ b/birdhouse/default.env @@ -2,7 +2,7 @@ # All env in this default.env must not depend on any env in env.local. # Jupyter single-user server images, can be overriden in env.local to have a space separated list of multiple images -export DOCKER_NOTEBOOK_IMAGES="pavics/workflow-tests:210527.1-update20210618" +export DOCKER_NOTEBOOK_IMAGES="pavics/workflow-tests:210527.1-update20210705" # Name of the image displayed on the JupyterHub image selection page # Can be overriden in env.local to have a space separated list of multiple images, the name order must correspond From 7e3018244bcefe42dc7321b6bef55cf56a13a660 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 6 Jul 2021 19:11:53 -0400 Subject: [PATCH 6/8] fix typo in changelog --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ce4df5242..1db3addb4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,7 +19,7 @@ - Notebook deployment: allow to specify required branch for any tutorial notebook repos in `env.local`. - Examaple: set `WORKFLOW_TESTS_BRANCH` and any other + Example: set `WORKFLOW_TESTS_BRANCH` and any other notebook deploy config like `PAVICS_LANDING_BRANCH` in `env.local`. To support testing of this PR From c05fdcac883ba45267854e0a328280330623bf36 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 6 Jul 2021 19:13:15 -0400 Subject: [PATCH 7/8] fix wrong indentation in changelog --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 1db3addb4..ef8420b25 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,7 +25,7 @@ To support testing of this PR https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/79. - - jupyter: minor update to add `unzip` package + - jupyter: minor update to add `unzip` package `unzip` needed to test PAVICS-landing notebooks under Jenkins. No other package updates. From 1353d263064e83208ecbef440be25b11c7eb25a8 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 6 Jul 2021 19:46:26 -0400 Subject: [PATCH 8/8] =?UTF-8?q?Bump=20version:=201.13.10=20=E2=86=92=201.1?= =?UTF-8?q?3.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 10 +++++----- CHANGES.md | 5 +++++ README.rst | 8 ++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 43a49c79f..0c777e0ba 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,19 +1,19 @@ [bumpversion] -current_version = 1.13.10 +current_version = 1.13.11 commit = True tag = False tag_name = {new_version} [bumpversion:file:CHANGES.md] -search = +search = [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ -replace = +replace = [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) ------------------------------------------------------------------------------------------------------------------ - + [//]: # (list changes here, using '-' for each new entry, remove this when items are added) - + [{new_version}](https://github.com/bird-house/birdhouse-deploy/tree/{new_version}) ({now:%Y-%m-%d}) ------------------------------------------------------------------------------------------------------------------ diff --git a/CHANGES.md b/CHANGES.md index ef8420b25..640f515bd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,11 @@ [//]: # ( bump2version will take care to generate a new empty 'Unreleased' section after version bump) [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) +------------------------------------------------------------------------------------------------------------------ + +[//]: # (list changes here, using '-' for each new entry, remove this when items are added) + +[1.13.11](https://github.com/bird-house/birdhouse-deploy/tree/1.13.11) (2021-07-06) ------------------------------------------------------------------------------------------------------------------ ### Changes diff --git a/README.rst b/README.rst index 91c1413c5..42c11f300 100644 --- a/README.rst +++ b/README.rst @@ -14,13 +14,13 @@ for a full-fledged production platform. * - releases - | |latest-version| |commits-since| -.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.13.10.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/1.13.11.svg :alt: Commits since latest release - :target: https://github.com/bird-house/birdhouse-deploy/compare/1.13.10...master + :target: https://github.com/bird-house/birdhouse-deploy/compare/1.13.11...master -.. |latest-version| image:: https://img.shields.io/badge/tag-1.13.10-blue.svg?style=flat +.. |latest-version| image:: https://img.shields.io/badge/tag-1.13.11-blue.svg?style=flat :alt: Latest Tag - :target: https://github.com/bird-house/birdhouse-deploy/tree/1.13.10 + :target: https://github.com/bird-house/birdhouse-deploy/tree/1.13.11 .. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest :alt: ReadTheDocs Build Status (latest version)