Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dmanik
gitlab-ci-talk
Commits
90816b4b
Commit
90816b4b
authored
Jun 02, 2019
by
Debsankha manik
Browse files
Fleshed out outline in NOTES.md; badge now works in talk.tex
parent
6ae76290
Changes
3
Hide whitespace changes
Inline
Side-by-side
NOTES.md
View file @
90816b4b
...
...
@@ -11,6 +11,7 @@
*
moonshot stuff: use a runner to submit jobs to a cluster..
*
CI/CD for external repo?
*
merge requests
Setting up your own runner
--------------------------
1.
...
...
@@ -20,3 +21,55 @@ Steps
*
Settings -> Pipelines -> enable
*
Enable a runner
*
Yes, it
*is*
that simple.
Story
-----
1.
Audience poll: how many of you use CI/CD pipelines?
2.
Core idea behind CICDP: predefined operations automatically applied on the codebase.
-
Exactly defined environment (docker image).
-
Exactly defined set of tasks (some parallel, some serial).
3.
Scenario one: automated testing
-
Let's say our codebase has a comprehensive test suite, but:
-
Passes on My Machine^TM.
-
Oh I forgot to tell you: tests for module
`foo`
fail unless
`libbar`
is compiled with
`-DSPAM=true`
flag.
4.
CICDP for automated testing:
-
Specify a docker image (e.g. python 3.6 and python 2.7)
+
TODO: check if multiple test environments are possible.
-
Setup the test environment
+
Install system packages using package manager, if necessary.
-
Run your test suite.
+
Web interface will show for which commits the test suite failed.
+
Nice badge.
5.
View on website.
6.
CICDP config pseudocode.
7.
Some optimizations
-
Pipeline takes too long because:
+
have to download files: use
`cache`
+
have to compile stuff: use
`cache`
-
Don't want to run pipeline for this commit (added docstring etc.)
+
TODO: find out if
`skipci`
exists.
-
Automatically run test suite on merge requests (TODO: figure out how).
8.
Great thing: CICDP configuration is a plaintext file, is under version control.
9.
Scenario two: integration tests
-
Test all the components of a stack.
-
Each components have unittests (and CI enabled).
-
But we want to know if all the components work together.
-
We wrote some tests that "simulates" a production environment.
-
But the tests take too long to run.
-
We also don't want to run these tests to run on each commit to each branch.
-
We want to run them only on
`master`
each night.
10.
CICDP configuration
-
branch/tag specific execution.
-
scheduled execution.
-
special badge generation.
11.
CICDP config pseudocode.
12.
View on website.
13.
Scenario three: write a paper.
-
Use docker image with a full TeX installation.
-
Define build stage with
`latexmk`
.
-
(Optional): Define plot generation stage.
-
Store the PDF using artifacts.
14.
Even more cool stuff one could do (should one?):
-
Package ones software and upload to (open source) repository.
-
snippets/ci-testing.yml
View file @
90816b4b
...
...
@@ -15,4 +15,3 @@ integration_tests:
-
master
script
:
-
python testsuite_runner.py run_integration_tests
talk.tex
View file @
90816b4b
...
...
@@ -4,6 +4,7 @@
\usepackage
{
minted
}
\usemintedstyle
{
xcode
}
\usepackage
{
booktabs
}
\usepackage
{
tcolorbox
}
\graphicspath
{{
figures/
}}
\beamertemplatenavigationsymbolsempty
\setbeamerfont
{
page number in head/foot
}{
size=
\large
}
...
...
@@ -14,6 +15,7 @@
\newcommand
{
\code
}
[1]
{
\colorbox
{
light-gray
}{
\texttt
{
#1
}}}
% end custom macros
\newtcbox
{
\badge
}{
nobeforeafter,colframe=green,colback=green!10!white,box align=base,size=fbox,arc=4pt
}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -66,7 +68,7 @@
\end{frame}
\begin{frame}
{
But I want the
\
code
{
unittests:passing
}
badge!
}
\begin{frame}
{
But I want the
\
badge
{
\texttt
{
unittests:passing
}
}
badge!
}
\end{frame}
\begin{frame}
{
Use case 2: integration tests
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment