Skip to content

Commit

Permalink
Merge pull request #180 from bird-house/allow-custom-tutorial-noteboo…
Browse files Browse the repository at this point in the history
…k-deploy-branch

Notebook deployment: allow to specify required branch for any tutorial notebook repos in env.local

## Changes

**Non-breaking changes**
- Notebook deployment: allow to specify required branch for any tutorial notebook repos in `env.local`
  
  Example: set `WORKFLOW_TESTS_BRANCH` and any other notebook deploy config like `PAVICS_LANDING_BRANCH` in `env.local`

- jupyter: minor update to add `unzip` package                                                                                                   

  `unzip` needed to test PAVICS-landing notebooks under Jenkins.  No other package updates.

To support this PR Ouranosinc/PAVICS-e2e-workflow-tests#79
  • Loading branch information
tlvu authored Jul 6, 2021
2 parents d06f99e + 1353d26 commit ead98c4
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -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})
------------------------------------------------------------------------------------------------------------------

Expand Down
23 changes: 23 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@

[//]: # (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

- Notebook deployment: allow to specify required branch for any tutorial
notebook repos in `env.local`.

Example: 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)
------------------------------------------------------------------------------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion birdhouse/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 19 additions & 15 deletions birdhouse/deployment/trigger-deploy-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
#
# 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

Expand All @@ -34,6 +25,25 @@ 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")")")"
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
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"
TUTORIAL_NOTEBOOKS_DIR="tutorial-notebooks"
if [ -z "$WORKFLOW_TESTS_BRANCH" ]; then
Expand All @@ -45,12 +55,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
Expand Down

0 comments on commit ead98c4

Please sign in to comment.