Skip to content
Snippets Groups Projects
Commit c0c17b35 authored by Jose Torres's avatar Jose Torres
Browse files

Merge branch '2nd-edition' into 'master'

Adds content for ci and badge

Adds about GitLab CI
Adds Registry 
Adds diagram
Adds CI badge

Closes #1

See merge request !2
parents 9454700b b31da46f
No related branches found
No related tags found
1 merge request!2Adds content for ci and badge
Pipeline #
[![build status](https://gitlab.com/gitlab-org/ci-training-slides/badges/master/build.svg)](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
Loading
Loading
@@ -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
Loading
Loading
@@ -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.
## 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/)
## 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-
![CI Architecture](https://about.gitlab.com/images/ci/arch-1.jpg)
 
mkdir ~/workspace
cd ~/workspace
```
Note:
- Mention examples such as building binaries, app packing and delivery, deployment, etc
## Workspace
## Runners
 
- Choose a directory on you machine easy to access
- Create a workspace or development directory
Loading
Loading
## 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>
```
Loading
Loading
@@ -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>
 
Loading
Loading
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 ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment