diff --git a/.gitignore b/.gitignore index 2c6961fb470558280140a67a2ef376b3ef016ffc..6f2cde42b36ac0c1f0e2031e3560723ae52e1623 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ flawfinder.out cppcheck.out cpd.out src/monitor. + +# ide +.vscode +.idea diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c38e2be9038804675ece168e10ed2a495312793d..74e237572e2f7e94b7cdbbc34e8be2441506531a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,10 @@ +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' + code-analysis-update: stage: build - image: iopsys/sdk-builder:latest + image: dev.iopsys.eu:5050/iopsys/iopsyswrt/sdk-builder:latest variables: GIT_STRATEGY: none script: @@ -23,6 +27,28 @@ code-analysis-update: max: 2 when: script_failure +update-docker-image: + stage: build + image: + name: gcr.io/kaniko-project/executor:v1.9.1-debug + entrypoint: [""] + script: + +# push to our registry + - | + /kaniko/executor \ + --context ${CI_PROJECT_DIR}/docker/code-analysis \ + --cache \ + --cache-copy-layers \ + --cache-repo "${CI_REGISTRY_IMAGE}/code-analysis/cache" \ + --dockerfile "${CI_PROJECT_DIR}/docker/code-analysis/Dockerfile" \ + --destination "${CI_REGISTRY_IMAGE}/code-analysis:${CI_COMMIT_SHA}" \ + --destination "${CI_REGISTRY_IMAGE}/code-analysis:${CI_COMMIT_REF_NAME}" \ + ${IS_DEFAULT_BRANCH:+--destination ${CI_REGISTRY_IMAGE}/code-analysis:latest} + rules: + - if: '$CI_COMMIT_REF_PROTECTED == "true"' + interruptible: true + pages: stage: deploy image: alpine:latest diff --git a/static-code-analysis.yml b/static-code-analysis.yml index 0f5908950f7a97d303bbcc0b1227fd2fde4519d1..65ffc0aa74cc0f68fee5770119c61abca76b1a19 100644 --- a/static-code-analysis.yml +++ b/static-code-analysis.yml @@ -3,7 +3,7 @@ variables: RUN_CPPCHECK: "cppcheck --enable=all --error-exitcode=1 --suppress=unusedFunction --suppress=unreadVariable --suppress=unmatchedSuppression ." RUN_CPD: "/home/user/pmd-bin-6.19.0/bin/run.sh cpd --minimum-tokens 200 --language c --exclude ./test/cmocka --files" SOURCE_FOLDER: "src" - COMMON_IMAGE: "iopsys/code-analysis:0.27" + COMMON_IMAGE: "dev.iopsys.eu:5050/iopsys/gitlab-ci-pipeline/code-analysis:0.27" DEBUG: "FALSE" run_static_code_analysis: