This lesson is in the early stages of development (Alpha version)

Continuous Integration / Continuous Development (CI/CD): Glossary

Key Points

  • CI/CD is crucial for any reproducibility and testing

  • Take advantage of automation to reduce your workload

Exit (light) Codes
  • Exit codes are used to identify if a command or script executed with errors or not

  • Not everyone respects exit codes

Being Assertive
  • You can do whatever you like in a test, as long as you return the right exit code

  • Pytest, and other test utilities, will propagate the exit codes correctly

Understanding Yet Another Markup Language
  • YAML is a plain-text format, similar to JSON, useful for configuration

  • YAML is a superset of JSON, so it contains additional features like comments and anchors, while still supporting JSON.

  • You should bookmark the GitLab reference on CI/CD. You’ll visit that page often.

  • A job is defined by a name and a script, at minimum.

  • Other than job names, reserved keywords are the top-level parameters defined in a YAML file.

Coffee break!
  • You’ll be back.

  • They’re the jedi of the sea.

Hello CI World
  • Adding a .gitlab-ci.yml is the first step to salvation.

  • Pipelines are made of stages, stages are made of jobs.

  • CI Linters are especially useful to check syntax before pushing changes.

Handling Your Clones
  • Git cloning strategies are configured with global (or per-job) variables

  • GIT_STRATEGY=none is useful when you don’t need any information/files from the repository

  • Submodules can be cloned normally or recursively as needed

Adding CI to Your Existing Code
  • Setting up CI/CD shouldn’t be mind-numbing

  • All defined jobs run in parallel by default

  • Jobs can be allowed to fail without breaking your CI/CD

Coffee break!
  • Stupid mistakes happen, but telling a computer to do what you mean versus what you say is hard

Eins Zwei DRY
  • Hidden jobs can be used as templates with the extends parameter.

  • Using job templates allows you to stay DRY!

All the World's a Stage
  • Stages allow for a mix of parallel/serial execution.

  • Stages help define job dependencies.

Run Analysis in CI/CD
  • Making code that is both human-friendly and computer-friendly is not so obvious.

  • Configurability is the crux of reproducibility.

  • Sometimes code that we thought was working fine, could use some “freshening” up.

  • We’re way too naive.

Getting into the Spy Game
  • Service accounts provide an extra layer of security between the outside world and your account

  • Environment variables in GitLab CI/CD allow you to hide protected information from others who can see your code

Let's Actually Make A Test (For Real)
  • This kind of test is a regression test, as we’re testing assuming the code up to this point was correct.

  • This is not a unit test. Unit tests would be testing individual pieces of the atlas/athena code-base, or specific functionality you wrote into your algorithms.


The glossary would go here, formatted as:

key word 1
:   explanation 1

key word 2
:   explanation 2

({:auto_ids} is needed at the start so that Jekyll will automatically generate a unique ID for each item to allow other pages to hyperlink to specific glossary entries.) This renders as:

key word 1
explanation 1
key word 2
explanation 2