From 14ee39d69657ecb85bc9ce525a6d980c08c738bf Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Thu, 25 Jul 2024 14:06:04 -0500 Subject: [PATCH] feat(back): #1355 increase git depth - Increase git depth to 3 for better compatibility - Deprecate gitDepth in favor of variables Signed-off-by: Daniel Salazar --- src/cli/main/cli.py | 2 +- src/evaluator/modules/pipelines/default.nix | 10 +++------- test/pipelines/.gitlab-ci.yaml | 8 ++++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/cli/main/cli.py b/src/cli/main/cli.py index f0cfcce6..35ab339d 100644 --- a/src/cli/main/cli.py +++ b/src/cli/main/cli.py @@ -91,7 +91,7 @@ CON.out("Using feature flag: MAKES_AWS_BATCH_COMPAT") CON.out() -GIT_DEPTH: int = int(environ.get("MAKES_GIT_DEPTH", "1")) +GIT_DEPTH: int = int(environ.get("MAKES_GIT_DEPTH", "3")) if GIT_DEPTH != 1: CON.out(f"Using feature flag: MAKES_GIT_DEPTH={GIT_DEPTH}") diff --git a/src/evaluator/modules/pipelines/default.nix b/src/evaluator/modules/pipelines/default.nix index 90d7e9a6..d67e65d8 100644 --- a/src/evaluator/modules/pipelines/default.nix +++ b/src/evaluator/modules/pipelines/default.nix @@ -10,10 +10,6 @@ let default = [ ]; type = lib.types.listOf lib.types.str; }; - gitDepth = lib.mkOption { - default = 1; - type = lib.types.int; - }; gitlabExtra = lib.mkOption { default = { }; type = lib.types.attrsOf lib.types.anything; @@ -66,7 +62,7 @@ let }; }; - makeGitlabJob = { args, gitDepth, gitlabExtra, image, output, ... }: { + makeGitlabJob = { args, gitlabExtra, image, output, ... }: { name = toJobName output args; value = attrsMerge [ { @@ -78,8 +74,8 @@ let else [ "m . ${output} ${escapeShellArgs args}" ]; variables = { - GIT_DEPTH = gitDepth; - MAKES_GIT_DEPTH = gitDepth; + GIT_DEPTH = 3; + MAKES_GIT_DEPTH = 3; }; } gitlabExtra diff --git a/test/pipelines/.gitlab-ci.yaml b/test/pipelines/.gitlab-ci.yaml index 96f25b44..515fb95b 100644 --- a/test/pipelines/.gitlab-ci.yaml +++ b/test/pipelines/.gitlab-ci.yaml @@ -5,8 +5,8 @@ script: - m . /helloWorld '1' '2' '3' variables: - GIT_DEPTH: 1 - MAKES_GIT_DEPTH: 1 + GIT_DEPTH: 3 + MAKES_GIT_DEPTH: 3 /lintNix: image: ghcr.io/fluidattacks/makes/amd64:24.02 interruptible: true @@ -14,5 +14,5 @@ script: - m . /lintNix variables: - GIT_DEPTH: 1 - MAKES_GIT_DEPTH: 1 + GIT_DEPTH: 3 + MAKES_GIT_DEPTH: 3