Continuous Integration / Continuous Deployment (CI/CD) - Github/Gitea Edition
GitHub is a distributed git platform used for code hosting and collaboration. It can also be used to automatically run the hosted code on Github’s servers via GitHub Actions. Actions are workflow automation scripts. We’ll learn how to develop on to make our code robust to errors, preserved, and reproducible.
Gitea is an open source replacement for GitHub.
The aim of this module is to help build and explore the meaning of a CI/CD workflow in both platforms.
Prerequisites
This assumes that you’ll have some basic background with your command line, for example:
- How to execute custom shell scripts (if you are not familiar with the shell, click here)
- How to run python scripts (if you are not familiar with python, click here)
- How to interact with remotes in git (if you are not familiar with git, click here; for simplified authentication with the
ghcommand line interface, see this version of the git training)
The skills we’ll focus on:
- Making scripts exit correctly
- Building a CI/CD workflow of unlimited potential
- Understanding how job runners work (and get access to your clones)
- Protecting secret information while allowing jobs to run
Learning Objectives
| Episode | Learning Objectives |
|---|---|
| Introduction |
|
| Exit Codes |
|
| Being Assertive |
|
| Understanding YAML |
|
| YAML and GitHub Actions |
|
| Coffee break! |
|
| Hello CI World |
|
| Adding CI to Your Existing Code |
|
| Matrix |
|
| Coffee break! |
|
| Dependent Jobs |
|
| A Skimmer Higgs |
|
| Getting into the Spy Game |
|
| Making Plots to Take Over The World |
|
| Let's Actually Make A Test (For Real) |
|
| Homework |
|
| Bonus Episode: Building and deploying a Docker container to Github Packages |
|
Schedule
| Time | Episode | Questions |
|---|---|---|
| Setup | Before you start | |
| 00:00 | Introduction
5 min |
|
| 00:05 | Exit Codes
20 min |
|
| 00:25 | Being Assertive
10 min |
|
| 00:35 | Understanding YAML
5 min |
|
| 00:40 | YAML and GitHub Actions
5 min |
|
| 00:45 | Coffee break!
15 min |
|
| 01:00 | Hello CI World
15 min |
|
| 01:15 |
| |
| 01:30 | Matrix
15 min |
|
| 01:45 | Coffee break!
15 min |
|
| 02:00 | Dependent Jobs
10 min |
|
| 02:10 | A Skimmer Higgs
15 min |
|
| 02:25 | Getting into the Spy Game
15 min |
|
| 02:40 |
| |
| 02:55 |
| |
| 03:20 | Homework
30 min |
|
| 03:50 |
|
Authors and Contributors
| Contributor | ORCID |
|---|---|
| Giordon Stark | 0000-0001-6616-3433 |
| Saransh Chopra | 0000-0003-3046-7675 |
| Aman Desai | 0000-0003-2631-9696 |
| Max Fatouros | 0000-0002-7438-652X |
| Guillermo A. Fidalgo-Rodríguez | 0000-0001-8605-9772 |
| Clemens Lange | 0000-0002-3632-3157 |
| Kilian Lieret | 0000-0003-2792-7511 |
| Laura Marqués | 0000-0002-3593-5557 |
| Emery Nibigira | 0000-0001-5821-291X |