From fa387e1e7036dfa8cf1218ded20157112b3c1246 Mon Sep 17 00:00:00 2001 From: trana Date: Tue, 17 Jan 2023 11:02:40 +0100 Subject: [PATCH] Added metrics for ldasoft --- .gitlab-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c28b36c..6a189b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,10 +3,12 @@ variables: # Either empty "" or contains "/" at the end (eg "imageparent/"). IMAGE_PARENT: "" ARTIFACT_DIR: "./archive" # must be relative to the build directory - https://gitlab.com/gitlab-org/gitlab-foss/-/issues/15530 - + # For metrics. Git repositories separated by "|". + repo_list_to_count: "https://github.com/tlittenberg/ldasoft" stages: - build + - count-lines-of-code - push default: @@ -60,6 +62,24 @@ build: paths: - "${ARTIFACT_DIR}/" +include: + remote: "https://gitlab.com/guided-explorations/code-metrics/ci-cd-extension-scc/-/raw/master/ci-cd-extension-scc.yml" +count-lines-of-code: + # Cleans because we only want metrics to the nested git clone. + before_script: + - | + pwd + id + ls -al + find + echo "Cleaning everyhing but ./archive for SCC of ${repo_list_to_count}..." + find -not -path ./archive -type f -delete + find -not -path ./archive -type d -delete + echo "Clean done." + find + stage: count-lines-of-code + extends: .ci-cd-extension-scc + push: stage: "push" image: