diff --git a/tp-gitlab-ci.ipynb b/tp-gitlab-ci.ipynb index 89f1ff13cc46e6eacaf3892590c0b7aac8e36842..a6bbe0ae6f4c397b1f5aca9564218819cea96435 100644 --- a/tp-gitlab-ci.ipynb +++ b/tp-gitlab-ci.ipynb @@ -144,7 +144,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -162,9 +162,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fatal: destination path 'tp-gitlab-ci' already exists and is not an empty directory.\n" + ] + }, + { + "ename": "", + "evalue": "128", + "output_type": "error", + "traceback": [] + } + ], "source": [ "cd $TPBASEDIR\n", "git clone git@git.unistra.fr:$USERNAME/tp-gitlab-ci.git" @@ -267,7 +281,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -276,9 +290,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Already up-to-date.\n", + "No local changes to save\n", + "Switched to branch 'exo1'\n", + "Your branch is up-to-date with 'origin/exo1'.\n" + ] + } + ], "source": [ "git pull\n", "git stash\n", @@ -295,13 +320,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": { "slideshow": { "slide_type": "subslide" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total 40\n", + "drwxr-xr-x 6 boileau staff 204 21 nov 11:15 \u001b[34m.\u001b[39;49m\u001b[0m\n", + "drwxr-xr-x@ 149 boileau staff 5066 21 nov 10:31 \u001b[34m..\u001b[39;49m\u001b[0m\n", + "drwxr-xr-x 16 boileau staff 544 21 nov 11:15 \u001b[34m.git\u001b[39;49m\u001b[0m\n", + "-rw-r--r-- 1 boileau staff 42 21 nov 11:15 .gitignore\n", + "-rw-r--r-- 1 boileau staff 78 21 nov 11:15 .gitlab-ci.yml\n", + "-rwxr-xr-x 1 boileau staff 8432 21 nov 10:35 \u001b[31mhelloworld.e\u001b[39;49m\u001b[0m\n" + ] + } + ], "source": [ "ls -al" ] @@ -315,9 +354,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "helloworld:\n", + " tags:\n", + " - shell, specific\n", + " script:\n", + " - echo \"hello, world\"\n" + ] + } + ], "source": [ "cat .gitlab-ci.yml" ] @@ -468,9 +519,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No local changes to save\n", + "Switched to branch 'exo2'\n", + "Your branch is up-to-date with 'origin/exo2'.\n", + "rm '.gitlab-ci.yml'\n" + ] + } + ], "source": [ "cd $TPDIR\n", "git stash # si vous avez des modifications non enregistrées dans exo1\n", @@ -491,9 +553,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total 56\n", + "drwxr-xr-x 8 boileau staff 272 21 nov 11:57 \u001b[34m.\u001b[39;49m\u001b[0m\n", + "drwxr-xr-x@ 149 boileau staff 5066 21 nov 11:27 \u001b[34m..\u001b[39;49m\u001b[0m\n", + "drwxr-xr-x 16 boileau staff 544 21 nov 11:57 \u001b[34m.git\u001b[39;49m\u001b[0m\n", + "-rw-r--r-- 1 boileau staff 77 21 nov 11:57 .gitignore\n", + "-rw-r--r-- 1 boileau staff 91 21 nov 11:57 helloworld.c\n", + "-rwxr-xr-x 1 boileau staff 8432 21 nov 10:35 \u001b[31mhelloworld.e\u001b[39;49m\u001b[0m\n", + "-rw-r--r-- 1 boileau staff 167 21 nov 11:57 makefile\n", + "-rw-r--r-- 1 boileau staff 149 21 nov 11:57 test_helloworld.py\n" + ] + } + ], "source": [ "ls -al" ] @@ -507,9 +585,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cc helloworld.c -o helloworld.e\n" + ] + } + ], "source": [ "make" ] @@ -535,7 +621,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -562,9 +648,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "build_hello:\n", + " stage: build\n", + " tags:\n", + " - shell\n", + " script:\n", + " - make\n" + ] + } + ], "source": [ "cat .gitlab-ci.yml" ] @@ -582,13 +681,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": { "slideshow": { "slide_type": "-" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[exo2 8243488] Add .gitlab-ci.yml with a build stage\n", + " 1 file changed, 7 deletions(-)\n" + ] + } + ], "source": [ "git add .gitlab-ci.yml\n", "git commit -m \"Add .gitlab-ci.yml with a build stage\"" @@ -596,14 +704,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": { "scrolled": true, "slideshow": { "slide_type": "subslide" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Counting objects: 3, done.\n", + "Delta compression using up to 4 threads.\n", + "Compressing objects: 100% (3/3), done.\n", + "Writing objects: 100% (3/3), 311 bytes | 311.00 KiB/s, done.\n", + "Total 3 (delta 2), reused 0 (delta 0)\n", + "remote: \n", + "remote: To create a merge request for exo2, visit:\u001b[K\n", + "remote: https://git.unistra.fr/m.boileau/tp-gitlab-ci/merge_requests/new?merge_request%5Bsource_branch%5D=exo2\u001b[K\n", + "remote: \n", + "To git.unistra.fr:m.boileau/tp-gitlab-ci.git\n", + " 8033a94..8243488 exo2 -> exo2\n" + ] + } + ], "source": [ "git push" ] @@ -637,9 +763,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cc helloworld.c -o helloworld.e\n", + "python test_helloworld.py\n" + ] + } + ], "source": [ "make test" ] @@ -665,7 +800,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -682,9 +817,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "build_hello:\n", + " stage: build\n", + " tags:\n", + " - shell\n", + " script:\n", + " - make\n", + "\n", + "test_hello:\n", + " stage: test\n", + " tags:\n", + " - shell\n", + " script:\n", + " - make test\n" + ] + } + ], "source": [ "cat .gitlab-ci.yml" ] @@ -702,13 +857,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": { "slideshow": { "slide_type": "-" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[exo2 69b4c3d] Add a test stage to .gitlab-ci.yml\n", + " 1 file changed, 7 insertions(+)\n" + ] + } + ], "source": [ "git add .gitlab-ci.yml\n", "git commit -m \"Add a test stage to .gitlab-ci.yml\"" @@ -716,11 +880,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Counting objects: 3, done.\n", + "Delta compression using up to 4 threads.\n", + "Compressing objects: 100% (3/3), done.\n", + "Writing objects: 100% (3/3), 351 bytes | 351.00 KiB/s, done.\n", + "Total 3 (delta 1), reused 0 (delta 0)\n", + "remote: \n", + "remote: To create a merge request for exo2, visit:\u001b[K\n", + "remote: https://git.unistra.fr/m.boileau/tp-gitlab-ci/merge_requests/new?merge_request%5Bsource_branch%5D=exo2\u001b[K\n", + "remote: \n", + "To git.unistra.fr:m.boileau/tp-gitlab-ci.git\n", + " 8243488..69b4c3d exo2 -> exo2\n" + ] + } + ], "source": [ "git push" ] @@ -771,9 +953,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No local changes to save\n", + "Switched to branch 'exo3'\n", + "Your branch is up-to-date with 'origin/exo3'.\n" + ] + } + ], "source": [ "cd $TPDIR\n", "git stash # si vous avez des modifications non enregistrées dans exo2\n", @@ -939,7 +1131,6 @@ } ], "metadata": { - "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Bash", "language": "bash",