nix/gitlab-ci: use when: manual and allow_failure: true

This commit is contained in:
Luke Granger-Brown 2021-05-22 22:58:25 +00:00
parent 320cc36312
commit d874257a28

View file

@ -31,12 +31,13 @@ let
"nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
"nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
];
allow_failure = true;
tags = [ "macos" ];
};
} // (lib.mapAttrs deployStage deployMachs);
deployMachs = lib.filterAttrs (name: cfg: cfg.config.my.deploy.enable) depot.ops.nixos.systemConfigs;
deployStage = machName: mach: {
deployStage = machName: mach: ({
stage = "deploy";
needs = [{ job = "nixCache"; artifacts = true; }];
tags = [ "deployer" ];
@ -46,7 +47,10 @@ let
environment = {
name = machName;
};
};
allow_failure = true;
} // lib.optionalAttrs (!mach.config.my.deploy.enable) {
when = "manual";
});
format = pkgs.formats.yaml { };
configFile = format.generate ".gitlab-ci.yml" cfg;