[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: The modern way to include our CI templates in your .gitlab-ci.yml
From: Ingo =?ISO-8859-1?Q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2023-10-31 22:37:49
Message-ID: 2911357.e9J7NaK4W3 () daneel
[Download RAW message or body]
Hi everybody,
TL,DR: Use include:project when including CI templates in your .gitlab-ci.yml,
e.g.
```
include:
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/linux-qt6.yml
- /gitlab-templates/freebsd-qt6.yml
- /gitlab-templates/android-qt6.yml
- /gitlab-templates/reuse-lint.yml
- /gitlab-templates/flatpak.yml
```
Details
Some of our CI templates are making use of local includes (think a KDE
Frameworks header that includes another header from the same framework with
#include "other.h"). Unfortunately, local includes are incompatible with our
old way to include the CI templates, i.e.
```
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/
linux-qt6.yml
```
If you try this with the (still experimental) craft-android-apks.yml template,
then GitLab will be very unhappy and tell you
| Unable to create pipeline
|
| * Local file `gitlab-templates/craft-android-base.yml` does not have project!
Therefore, we have to switch to the "modern" include:project [1]. This format
also offers an intuitive way to include CI templates from a work branch if you
are hacking on the CI templates and want to test them by adding a `ref`, e.g.
```
include:
[...]
- project: sysadmin/ci-utilities
ref: work/kloecker/improve-craft-templates
file:
- /gitlab-templates/craft-android-apks.yml
```
More information about our CI system can be found at
https://community.kde.org/Infrastructure/Continuous_Integration_System
And a brief description of our CI/CD templates can be found at
https://invent.kde.org/sysadmin/ci-utilities/-/tree/master/gitlab-templates#our-gitlab-cicd-pipelines
Regards,
Ingo
[1] https://invent.kde.org/help/ci/yaml/index.md#includeproject
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic