From 4768b2d04d016bdfed6c30ee6e554a2b2eb28138 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sun, 12 May 2024 20:16:33 +0200
Subject: [PATCH] fix: wip new pipeline

---
 flake.nix | 112 ++++++++++++++++++++++++++----------------------------
 1 file changed, 53 insertions(+), 59 deletions(-)

diff --git a/flake.nix b/flake.nix
index 0ed79d9bd..1f2ba500b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -48,16 +48,14 @@
         versionPath
       ];
 
-      gitlabPackages = 
-       commonPackages
-              ++ scriptPackages
-                ++ [
-                
-        script-deploy
-        script-clean-up
-        script-run-ci-tests
+      gitlabPackages =
+        commonPackages
+        ++ scriptPackages
+        ++ [
+          script-deploy
+          script-clean-up
+          script-run-ci-tests
         ];
-      
 
       shellPackages = let
         lib = pkgs'.lib;
@@ -65,8 +63,6 @@
         commonPackages
         ++ extendedPackages
         ++ scriptPackages;
-
-   
     in {
       packages = rec {
         monster = pkgs'.callPackage ./nix/packages/monster.nix {inherit commonScript;};
@@ -75,7 +71,6 @@
       };
 
       devShells = {
-      
         default = let
           ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
         in
@@ -120,54 +115,53 @@
           pkgs'.mkShell {
             #nativeBuildInputs = gitlabPackages;
 
-
             shellHook = ''
-           
-           
-           set -x
-           
-           ${pkgs'.coreutils}/bin/printenv
-           
-                
-    if [ -z "$GITLAB_TOKEN" ]; then
-        exit 1
-    fi
-
-    if [ -z "''${CI_REPOSITORY_URL}" ]; then
-        exit 1
-    fi
-
-    if [ -z "''${CI_PROJECT_DIR}" ]; then
-        exit 1
-    fi
-
-    cd ''${CI_PROJECT_DIR} || exit 1
-
-    ${pkgs'.git}/bin/git config --global user.email "''${GITLAB_USER_EMAIL}"
-    ${pkgs'.git}/bin/git config --global user.name "''${GITLAB_USER_NAME}"
-    ${pkgs'.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=''${CI_JOB_TOKEN}"; }; f'
-    ${pkgs'.git}/bin/git config --global pull.rebase true
-    ${pkgs'.git}/bin/git config --global http.sslVerify "false"
-
-    ${pkgs'.git}/bin/git remote set-url origin https://pad:''${GITLAB_TOKEN}@''${CI_REPOSITORY_URL#*@}
-
-    ${pkgs'.git}/bin/git fetch --all --tags --unshallow
-    ${pkgs'.git}/bin/git reset --hard origin/master
-    ${pkgs'.git}/bin/git clean -fd
-    ${pkgs'.git}/bin/git checkout $CI_COMMIT_REF_NAME
-    ${pkgs'.git}/bin/git pull origin $CI_COMMIT_REF_NAME
-
-    if ! ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 30
-    then
-        exit 1
-    fi
-
-    ${pkgs'.git}/bin/git fetch --prune --prune-tags
-    
-    echo "YES!!!!"
-
-                
-                
+            
+            
+            set -x
+            
+            ${pkgs'.coreutils}/bin/printenv
+
+            
+            if [ -z "''${GITLAB_TOKEN}" ]; then
+           #   exit 1
+            fi
+            
+            if [ -z "''${CI_REPOSITORY_URL}" ]; then
+          #    exit 1
+            fi
+            
+            if [ -z "''${CI_PROJECT_DIR}" ]; then
+           #   exit 1
+            fi
+            
+            cd ''${CI_PROJECT_DIR} || exit 1
+            
+            ${pkgs'.git}/bin/git config --global user.email "''${GITLAB_USER_EMAIL}"
+            ${pkgs'.git}/bin/git config --global user.name "''${GITLAB_USER_NAME}"
+            ${pkgs'.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=''${CI_JOB_TOKEN}"; }; f'
+            ${pkgs'.git}/bin/git config --global pull.rebase true
+            ${pkgs'.git}/bin/git config --global http.sslVerify "false"
+            
+            ${pkgs'.git}/bin/git remote set-url origin https://pad:''${GITLAB_TOKEN}@''${CI_REPOSITORY_URL#*@}
+            
+            ${pkgs'.git}/bin/git fetch --all --tags --unshallow
+            ${pkgs'.git}/bin/git reset --hard origin/master
+            ${pkgs'.git}/bin/git clean -fd
+            ${pkgs'.git}/bin/git checkout $CI_COMMIT_REF_NAME
+            ${pkgs'.git}/bin/git pull origin $CI_COMMIT_REF_NAME
+            
+            if ! ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 30
+            then
+              exit 1
+            fi
+            
+            ${pkgs'.git}/bin/git fetch --prune --prune-tags
+            
+            echo "YES!!!!"
+
+
+
             '';
           };
       };
-- 
GitLab