chore(CI): modify cache_files and add ssl ca certs to test job

This commit is contained in:
technofab 2025-09-03 14:29:56 +02:00
parent cf04bf5357
commit a076f0048a
No known key found for this signature in database
3 changed files with 10 additions and 1 deletions

View file

@ -47,6 +47,9 @@ deploy:image:
include: include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/nix-gitlab-ci@$CI_COMMIT_SHORT_SHA - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/nix-gitlab-ci@$CI_COMMIT_SHORT_SHA
inputs: inputs:
cache_files:
- flake.*
- nix/repo/ci.nix
version: $CI_COMMIT_SHORT_SHA version: $CI_COMMIT_SHORT_SHA
stages: stages:
- build-images - build-images

View file

@ -1,10 +1,11 @@
{inputs, ...}: let {inputs, ...}: let
inherit (inputs) cilib; inherit (inputs) pkgs cilib;
in in
cilib.mkCI { cilib.mkCI {
config.soonix = { config.soonix = {
componentUrl = "$CI_SERVER_FQDN/$CI_PROJECT_PATH/nix-gitlab-ci"; componentUrl = "$CI_SERVER_FQDN/$CI_PROJECT_PATH/nix-gitlab-ci";
componentVersion = "$CI_COMMIT_SHORT_SHA"; componentVersion = "$CI_COMMIT_SHORT_SHA";
componentInputs.cache_files = ["flake.*" "nix/repo/ci.nix"];
# bootstrapping still needs to be done in the gitlab-ci.yml directly, # bootstrapping still needs to be done in the gitlab-ci.yml directly,
# the child pipeline can then use the built images to test them # the child pipeline can then use the built images to test them
extraData = { extraData = {
@ -63,6 +64,10 @@ in
script = [ script = [
"nix run .#tests -- --junit=junit.xml" "nix run .#tests -- --junit=junit.xml"
]; ];
variables = {
"SSL_CERT_FILE" = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
"NIX_SSL_CERT_FILE" = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
};
allow_failure = true; allow_failure = true;
artifacts = { artifacts = {
when = "always"; when = "always";

View file

@ -34,6 +34,7 @@
expected = { expected = {
stages = [".pre" "test" ".post"]; stages = [".pre" "test" ".post"];
"test" = { "test" = {
image = "$NIX_CI_IMAGE";
stage = "test"; stage = "test";
before_script = ["source setup_nix_ci \"gitlab-ci:pipeline:test:job-deps:test\""]; before_script = ["source setup_nix_ci \"gitlab-ci:pipeline:test:job-deps:test\""];
script = ["echo hello world"]; script = ["echo hello world"];