From 9007c4af42ca8992ccf111b44db721ccf5c4ffbb Mon Sep 17 00:00:00 2001
From: Matthieu Boileau <matthieu.boileau@math.unistra.fr>
Date: Tue, 21 Nov 2017 01:49:55 +0100
Subject: [PATCH] Update to clean exos

---
 launch_slide.sh    |  2 +-
 make_slides.sh     |  2 +-
 tp-gitlab-ci.ipynb | 50 ++++++++++++++++++++--------------------------
 3 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/launch_slide.sh b/launch_slide.sh
index 3a7c43e..5365c34 100755
--- a/launch_slide.sh
+++ b/launch_slide.sh
@@ -2,4 +2,4 @@
 
 set -x
 nbfile="tp-gitlab-ci.ipynb"
-jupyter-nbconvert $nbfile --to slides --post serve $2 --allow-errors
+jupyter-nbconvert $nbfile --to slides --post serve --execute --allow-errors
diff --git a/make_slides.sh b/make_slides.sh
index d136115..c8b3d84 100755
--- a/make_slides.sh
+++ b/make_slides.sh
@@ -5,7 +5,7 @@ set -x
 notebooks="tp-gitlab-ci.ipynb"
 revealprefix="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0"
 
-jupyter-nbconvert $notebooks --to slides --reveal-prefix $revealprefix --output-dir=public
+jupyter-nbconvert $notebooks --to slides --reveal-prefix $revealprefix --output-dir=public --execute --allow-errors
 jupyter-nbconvert index.ipynb --to html --output-dir=public
 cp *.ipynb public/
 cp *.png public/
diff --git a/tp-gitlab-ci.ipynb b/tp-gitlab-ci.ipynb
index 7ac1bfb..51fe741 100644
--- a/tp-gitlab-ci.ipynb
+++ b/tp-gitlab-ci.ipynb
@@ -149,7 +149,7 @@
    "outputs": [],
    "source": [
     "export USERNAME=\"m.boileau\"  # votre login sur git.unistra.fr\n",
-    "export TPBASEDIR=$HOME      # le répertoire où vous souhaitez installer le TP\n",
+    "export TPBASEDIR=$HOME       # le répertoire où vous souhaitez installer le TP\n",
     "export TPDIR=$TPBASEDIR/tp-gitlab-ci"
    ]
   },
@@ -271,8 +271,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "cd $TPDIR\n",
-    "cd tp-gitlab-ci"
+    "cd $TPDIR"
    ]
   },
   {
@@ -282,7 +281,9 @@
    "outputs": [],
    "source": [
     "git pull\n",
-    "git checkout exo1"
+    "git stash\n",
+    "git checkout exo1\n",
+    "git checkout exo1-start .gitlab-ci.yml  # Clean previous modifications"
    ]
   },
   {
@@ -405,7 +406,7 @@
     }
    },
    "source": [
-    "Pousser vos modifications"
+    "Poussez vos modifications"
    ]
   },
   {
@@ -441,7 +442,7 @@
    "source": [
     "### Provoquez une erreur\n",
     "\n",
-    "Dans `.gitlab-ci.yml`, introduisez une erreur dans une des lignes du script et observer l'effet dans `CI / CD > Pipelines` après avoir pousser les modifications.\n",
+    "Dans `.gitlab-ci.yml`, introduisez une erreur dans une des lignes du script et observer l'effet dans `CI / CD > Pipelines` après avoir poussé les modifications.\n",
     "\n",
     "> **Note :** les fichiers peuvent s'éditer directement dans GitLab."
    ]
@@ -473,7 +474,8 @@
    "source": [
     "cd $TPDIR\n",
     "git stash  # si vous avez des modifications non enregistrées dans exo1\n",
-    "git checkout exo2"
+    "git checkout exo2\n",
+    "git rm .gitlab-ci.yml  # Clean previous commits"
    ]
   },
   {
@@ -689,7 +691,11 @@
   },
   {
    "cell_type": "markdown",
-   "metadata": {},
+   "metadata": {
+    "slideshow": {
+     "slide_type": "subslide"
+    }
+   },
    "source": [
     "On enregistre, on pousse et on vérifie l'exécution de la chaîne d'intégration continue dans `CI / CD > Pipelines`\n"
    ]
@@ -721,7 +727,11 @@
   },
   {
    "cell_type": "markdown",
-   "metadata": {},
+   "metadata": {
+    "slideshow": {
+     "slide_type": "subslide"
+    }
+   },
    "source": [
     "### Provoquez des erreurs\n",
     "\n",
@@ -733,26 +743,10 @@
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": 36,
+   "cell_type": "markdown",
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "bash: Récupérer: command not found\n"
-     ]
-    },
-    {
-     "ename": "",
-     "evalue": "127",
-     "output_type": "error",
-     "traceback": []
-    }
-   ],
-   "source": [
-    "Récupérer un artifact"
+   "source": [
+    "## Récupérer un artifact"
    ]
   },
   {
-- 
GitLab