Commit 90816b4b authored by Debsankha manik's avatar Debsankha manik
Browse files

Fleshed out outline in NOTES.md; badge now works in talk.tex

parent 6ae76290
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* moonshot stuff: use a runner to submit jobs to a cluster.. * moonshot stuff: use a runner to submit jobs to a cluster..
* CI/CD for external repo? * CI/CD for external repo?
* merge requests * merge requests
Setting up your own runner Setting up your own runner
-------------------------- --------------------------
1. 1.
...@@ -20,3 +21,55 @@ Steps ...@@ -20,3 +21,55 @@ Steps
* Settings -> Pipelines -> enable * Settings -> Pipelines -> enable
* Enable a runner * Enable a runner
* Yes, it *is* that simple. * 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.
-
...@@ -15,4 +15,3 @@ integration_tests: ...@@ -15,4 +15,3 @@ integration_tests:
- master - master
script: script:
- python testsuite_runner.py run_integration_tests - python testsuite_runner.py run_integration_tests
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
\usepackage{minted} \usepackage{minted}
\usemintedstyle{xcode} \usemintedstyle{xcode}
\usepackage{booktabs} \usepackage{booktabs}
\usepackage{tcolorbox}
\graphicspath{{figures/}} \graphicspath{{figures/}}
\beamertemplatenavigationsymbolsempty \beamertemplatenavigationsymbolsempty
\setbeamerfont{page number in head/foot}{size=\large} \setbeamerfont{page number in head/foot}{size=\large}
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
\newcommand{\code}[1]{\colorbox{light-gray}{\texttt{#1}}} \newcommand{\code}[1]{\colorbox{light-gray}{\texttt{#1}}}
% end custom macros % end custom macros
\newtcbox{\badge}{nobeforeafter,colframe=green,colback=green!10!white,box align=base,size=fbox,arc=4pt}
\begin{document} \begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -66,7 +68,7 @@ ...@@ -66,7 +68,7 @@
\end{frame} \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} \end{frame}
\begin{frame}{Use case 2: integration tests} \begin{frame}{Use case 2: integration tests}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment