Skip to content
Snippets Groups Projects
Verified Commit 20ced68d authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: wip new pipeline

parent e3793e54
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ test: ...@@ -17,7 +17,7 @@ test:
tags: tags:
- nixos-gen3 - nixos-gen3
script: script:
- nix develop --command run-ci-tests - nix develop .#gitlab --command run-ci-tests
deploy: deploy:
stage: deploy stage: deploy
...@@ -29,3 +29,4 @@ deploy: ...@@ -29,3 +29,4 @@ deploy:
- nix develop --command clean-up - nix develop --command clean-up
when: on_success when: on_success
\ No newline at end of file
...@@ -48,34 +48,34 @@ ...@@ -48,34 +48,34 @@
versionPath versionPath
]; ];
ciScriptPackages = [ gitlabPackages =
commonPackages
++ scriptPackages
++ [
script-deploy script-deploy
script-clean-up script-clean-up
script-run-ci-tests script-run-ci-tests
]; ];
shellPackages = let shellPackages = let
lib = pkgs'.lib; lib = pkgs'.lib;
gitlabToken = builtins.getEnv "GITLAB_TOKEN";
in in
commonPackages commonPackages
++ extendedPackages ++ extendedPackages
++ scriptPackages ++ scriptPackages;
++ lib.optionals (gitlabToken!="") ciScriptPackages;
debugShellPackages =
commonPackages
++ scriptPackages
++ [
];
in { in {
packages = rec { packages = rec {
monster = pkgs'.callPackage ./nix/packages/monster.nix {inherit commonScript;}; monster = pkgs'.callPackage ./nix/packages/monster.nix {inherit commonScript;};
default = self.monster; default = monster;
}; };
devShells = { devShells = {
default = let default = let
ciJobToken = builtins.getEnv "CI_JOB_TOKEN"; ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
in in
...@@ -114,11 +114,11 @@ ...@@ -114,11 +114,11 @@
''; '';
}; };
debug = let gitlab = let
ciJobToken = builtins.getEnv "CI_JOB_TOKEN"; ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
in in
pkgs'.mkShell { pkgs'.mkShell {
nativeBuildInputs = debugShellPackages; nativeBuildInputs = gitlabPackages;
# apps.run-server = pkgs'.writeShellScriptBin "run-server" '' # apps.run-server = pkgs'.writeShellScriptBin "run-server" ''
# ${commonScript} # ${commonScript}
...@@ -126,6 +126,14 @@ ...@@ -126,6 +126,14 @@
# ''; # '';
shellHook = '' shellHook = ''
source ${commonScript}
if [ -z "${ciJobToken}" ]; then
echo_fail "You are not in a CI environment, this shell is intended for CI, but for local development"
exit 1
fi
echo_header "Gitlab Monster Shell"
''; '';
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment