From b31da46ff6a2410552fb651535854b69d65b169f Mon Sep 17 00:00:00 2001 From: Jose Torres <torres@balameb.com> Date: Sun, 13 Nov 2016 16:01:23 -0600 Subject: [PATCH] Adds content for ci and badge --- README.md | 6 +- content/concepts.md | 13 +- content/gitlab_ci.md | 33 ++-- content/{workspace.md => runners.md} | 2 +- content/sample_app.md | 45 ++++- index.html | 261 +++++++++------------------ npm-debug.log | 39 ++++ 7 files changed, 193 insertions(+), 206 deletions(-) rename content/{workspace.md => runners.md} (94%) create mode 100644 npm-debug.log diff --git a/README.md b/README.md index 8af2ea3..f40effc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[](https://gitlab.com/gitlab-org/ci-training-slides/commits/master) + # CI/CD GitLab Training This project hosts the RevelJS framework and content that renders the CI/CD trainingt slides. Presentation behavior and @@ -30,7 +32,7 @@ Content is design to be served in one session of about three or three and a half ### Sample Application -The slides require using a sample CI application which can be found at https://gitlab.com/balameb/ci-training-sample +The slides require using a sample CI application which can be found at https://gitlab.com/gitlab-org/ci-training-sample ## reveal.js References: - [Installation](https://github.com/hakimel/reveal.js/#installation): Step-by-step instructions for getting reveal.js @@ -39,4 +41,4 @@ running on your computer. fallbacks. - [Speaker Notes](https://github.com/hakimel/reveal.js/#speaker-notes): Plugin to view speaker notes on a different browser window. -- [PDF Export](https://github.com/hakimel/reveal.js/#pdf-export): Export slides to a PDF. \ No newline at end of file +- [PDF Export](https://github.com/hakimel/reveal.js/#pdf-export): Export slides to a PDF. diff --git a/content/concepts.md b/content/concepts.md index da31a41..584f327 100644 --- a/content/concepts.md +++ b/content/concepts.md @@ -1,9 +1,14 @@ ## Concepts -- *Continouos Integration*: software development practice where code is integrated regularly. +- *Continouos Integration*: software development practice where code is +integrated regularly. + - Integration usually includes building and testing -- *Continouos Deployment*: closely related to CI but also implies releasing integrated code into production -- References: + +- *Continouos Deployment*: closely related to CI but also implies releasing +integrated code into production + +- References: - [Martin Fowler](http://www.martinfowler.com/articles/continuousIntegration.html) - [ThoughtWorks](https://www.thoughtworks.com/continuous-integration) - - [Agile Alliance](https://www.agilealliance.org/glossary/continuous-integration/) + - [Agile Alliance](https://www.agilealliance.org/glossary/continuous-integration/) diff --git a/content/gitlab_ci.md b/content/gitlab_ci.md index 6ec8b71..f3025e4 100644 --- a/content/gitlab_ci.md +++ b/content/gitlab_ci.md @@ -1,17 +1,28 @@ -## GitLab CI/CD +## GitLab CI/CD -- Choose a directory on you machine easy to access -- Create a workspace or development directory -- This is where we'll be working and adding content +- Test result visibility and validation + +- Application Lifecycle + +- Continuous Delivery: multiple stages, manual deploys, environments, and +variables + +- Open source + +Note: +- How does the CI/CD functionality that GitLab offers help the team? +- May be useful to get some ideas about what they are building ---------- -``` -mkdir ~/development -cd ~/development +- CI is fully integrated with GitLab + +- Scalable: Tests run distributed on separate machines of which you can add as +many as you need + +- Jobs run in parallel on multiple machines --or- + -mkdir ~/workspace -cd ~/workspace -``` +Note: +- Mention examples such as building binaries, app packing and delivery, deployment, etc diff --git a/content/workspace.md b/content/runners.md similarity index 94% rename from content/workspace.md rename to content/runners.md index 7e0906f..82db032 100644 --- a/content/workspace.md +++ b/content/runners.md @@ -1,4 +1,4 @@ -## Workspace +## Runners - Choose a directory on you machine easy to access - Create a workspace or development directory diff --git a/content/sample_app.md b/content/sample_app.md index da718bf..3c55fd0 100644 --- a/content/sample_app.md +++ b/content/sample_app.md @@ -1,17 +1,44 @@ -## Sample App +## Sample App -- Choose a directory on you machine easy to access -- Create a workspace or development directory -- This is where we'll be working and adding content ---------- +## Docker + +Download and modify a Docker image: + +``` +docker images +docker run -t -i ruby:2.3 /bin/bash + +$ apt-get update +$ apt-get install nodejs -y +$ gem install bundler --no-ri --no-rdoc +# A Dockerfile is a great option for the following line or +# maybe integrate with our current CI script? +$ bundle install +$ exit + +# Log back in? +docker ps -a # and get container sha +docker start -i <container-sha> +``` + +---------- +## Create a custom image + +docker tag <image id> <url>:<port>/<user/project>:<tag> + ``` -mkdir ~/development -cd ~/development +# Commit a new image +docker commit -m "Adds dependencies" -a "Peter Parker" \ +<container-sha> registry.gitlab.com/<group-name>/projectname:v2 --or- +# Login in to GitLab registry +# docker login registry.gitlab.com +docker login <url>:<port> -mkdir ~/workspace -cd ~/workspace +# Push image to registry +# docker push registry.gitlab.com/gitlab-org/ci-training-sample +docker push <registry-url>/<group-name>/<project-name>:<tag> ``` diff --git a/index.html b/index.html index dcce890..97a1ee6 100644 --- a/index.html +++ b/index.html @@ -33,199 +33,102 @@ <script src="lib/js/html5shiv.js"></script> <![endif]--> </head> - <body> - - <div class="reveal"> - + <!-- top left GitLab logo --> <img style="padding: 1em; width: 100px; opacity: 0.5; position: absolute;" src="https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo.png"> - <!-- Any section element inside of this container is displayed as a slide --> + <div class="slides"> - <!-- View presentation notes --> + <!-- Main Title --> <section data-markdown> # GitLab CI/CD Training + + Note: + - Check with the stakeholder if the team is ready + - Make sure to start recording </section> - <section> - <section> - <h2>Agenda</h2> + <!-- Introduction --> + <section data-markdown> + # Introduction + + Note: + - Trainer introduction, suggestions: + - Name + - Job role + - Why attedees should spend 3 hrs listening to you + - GitLab introduction + - About GitLab </section> + + <!-- Agenda --> <section> - <table> - <thead> - <tr> - <th>Sections</th> - </tr> - </thead> - <tbody> - <tr> - <td>Introduction</td> - </tr> - <tr> - <td>Concepts</td> - </tr> - <tr> - <td>Why use CI/CD</td> - </tr> - <tr> - <td>Concepts</td> - </tr> - <tr> - <td>Sample App</td> - </tr> - <tr> - <td>CI Setup</td> - </tr> - <tr> - <td>Questions</td> - </tr> - </tbody> - </table> + <!-- nested agenda sections --> + <section data-markdown> + ## Agenda + + Note: + - Announce a quick brake after covering the Sample App section + - The brake is also for us to make sure attendees have everything + setup + - Also announce a Q & A at the end of the session + </section> + + <section data-markdown> + - Introduction + - Concepts + - Why use CI/CD + - Sample App + - CI Setup + - Runners + - Questions + </section> + </section> + + <!-- Concepts --> + <section data-markdown="content/concepts.md" + data-separator="^\n\n\n" + data-separator-vertical="^----------" + data-separator-notes="^Note:" + data-charset="iso-8859-15"> </section> - </section> - - <section data-markdown> - # Introduction - </section> - - <section data-markdown="content/content.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <aside class="notes" data-markdown> - ### CI/CD - sds - </aside> - - <section data-markdown="content/short_story_git.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/what_git.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/help.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown> - ## Git Setup - Workshop Time! - </section> - - <section data-markdown="content/install.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/config.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/workspace.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown> - ## Git Basics - </section> - - <section data-markdown="content/git_workflow.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/gitlab_intro.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/gitlab_git.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/feature_branching.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/merge_requests.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown> - # Merge Conflicts - </section> - - <section data-markdown="content/merge_conflicts.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown> - # Revert and Unstage - </section> - - <section data-markdown="content/unstage.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - <section data-markdown="content/revert.md" - data-separator="^\n\n\n" - data-separator-vertical="^----------" - data-separator-notes="^Note:" - data-charset="iso-8859-15"> - </section> - - - - <section data-markdown> - # Questions - - Thank you for your hard work! - </section> + <!-- Why use CI --> + <section data-markdown="content/gitlab_ci.md" + data-separator="^\n\n\n" + data-separator-vertical="^----------" + data-separator-notes="^Note:" + data-charset="iso-8859-15"> + </section> + + <!-- Sample Application --> + <section data-markdown="content/sample_app.md" + data-separator="^\n\n\n" + data-separator-vertical="^----------" + data-separator-notes="^Note:" + data-charset="iso-8859-15"> + </section> + + <!-- Why use CI --> + <section data-markdown="content/what_git.md" + data-separator="^\n\n\n" + data-separator-vertical="^----------" + data-separator-notes="^Note:" + data-charset="iso-8859-15"> + </section> + + <section data-markdown> + # Questions + + Thank you for your hard work! + + Note: + - A hard stop at 30 mins into this section is a good range of time + - Ideally we can also share another channel of sending questions if + they have none at the moment + </section> </div> diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..aa2b1d5 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,39 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/Users/uno/.nvm/versions/node/v4.2.3/bin/node', +1 verbose cli '/Users/uno/.nvm/versions/node/v4.2.3/bin/npm', +1 verbose cli 'start' ] +2 info using npm@2.14.7 +3 info using node@v4.2.3 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info prestart reveal.js@3.2.0 +6 info start reveal.js@3.2.0 +7 verbose unsafe-perm in lifecycle true +8 info reveal.js@3.2.0 Failed to exec start script +9 verbose stack Error: reveal.js@3.2.0 start: `grunt serve` +9 verbose stack Exit status 1 +9 verbose stack at EventEmitter.<anonymous> (/Users/uno/.nvm/versions/node/v4.2.3/lib/node_modules/npm/lib/utils/lifecycle.js:214:16) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at EventEmitter.emit (events.js:172:7) +9 verbose stack at ChildProcess.<anonymous> (/Users/uno/.nvm/versions/node/v4.2.3/lib/node_modules/npm/lib/utils/spawn.js:24:14) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at ChildProcess.emit (events.js:172:7) +9 verbose stack at maybeClose (internal/child_process.js:818:16) +9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) +10 verbose pkgid reveal.js@3.2.0 +11 verbose cwd /Users/uno/GitLab/ci-training-slides +12 error Darwin 16.1.0 +13 error argv "/Users/uno/.nvm/versions/node/v4.2.3/bin/node" "/Users/uno/.nvm/versions/node/v4.2.3/bin/npm" "start" +14 error node v4.2.3 +15 error npm v2.14.7 +16 error code ELIFECYCLE +17 error reveal.js@3.2.0 start: `grunt serve` +17 error Exit status 1 +18 error Failed at the reveal.js@3.2.0 start script 'grunt serve'. +18 error This is most likely a problem with the reveal.js package, +18 error not with npm itself. +18 error Tell the author that this fails on your system: +18 error grunt serve +18 error You can get their info via: +18 error npm owner ls reveal.js +18 error There is likely additional logging output above. +19 verbose exit [ 1, true ] -- GitLab