From 20946c439f65674ca915da113f643ec2efbbd659 Mon Sep 17 00:00:00 2001 From: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu> Date: Tue, 21 Jan 2025 13:09:47 +0530 Subject: [PATCH] ebtables-extension: fix pipeline --- .gitlab-ci.yml | 21 +++------------------ gitlab-ci/build.sh | 5 +++++ gitlab-ci/install-dependencies.sh | 8 ++++++++ 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100755 gitlab-ci/build.sh create mode 100755 gitlab-ci/install-dependencies.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76c97b9..e480abe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,13 @@ variables: SOURCE_FOLDER: "src" + FLAWFINDER_OPTIONS: "-m 4 --error-level=5" + CPPCHECK_OPTIONS: "--suppress=cert-MSC24-C" + COMPILATION_FIXUP: "echo '[{\"dont\": \"compile\"}]' > compile_commands.json" include: - project: 'iopsys/gitlab-ci-pipeline' file: '/static-code-analysis.yml' ref: '1.2' -# override original, because we cannot compile here -# because this is a kernel module and kernel headers -# are not available in the docker image -run_static_code_analysis: - image: ${COMMON_IMAGE} - stage: static_code_analysis - allow_failure: false - script: - - /usr/local/pmd/bin/run.sh cpd --language c --exclude ./test/ ${CPD_OPTIONS} --files ${SOURCE_FOLDER} - - flawfinder --minlevel 4 --error-level=4 ${FLAWFINDER_OPTIONS} ${SOURCE_FOLDER} - rules: - - if: $SOURCE_FOLDER - when: always - artifacts: - when: on_failure - paths: - - report.txt - stages: - static_code_analysis diff --git a/gitlab-ci/build.sh b/gitlab-ci/build.sh new file mode 100755 index 0000000..57429d7 --- /dev/null +++ b/gitlab-ci/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +echo "build stage" +pwd +make -C /lib/modules/$(uname -r)/build M=$(pwd) diff --git a/gitlab-ci/install-dependencies.sh b/gitlab-ci/install-dependencies.sh new file mode 100755 index 0000000..7780305 --- /dev/null +++ b/gitlab-ci/install-dependencies.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "install dependencies" + +#sudo apt-get update # This will update the repositories list +#sudo apt-get upgrade # This will update all the necessary packages on your system +#sudo apt-get dist-upgrade # This will add/remove any needed packages +#sudo apt-get -y install linux-headers-$(uname -r) -- GitLab