Commit a7e6078e authored by Michael Tesch's avatar Michael Tesch
Browse files

Set .gitlab-ci.yml to enable or configure SAST

parent 1397e44d
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
#image: ubuntu:19.04
# You can override the included template(s) by including variable overrides
# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables
image: fedora:30

variables:
@@ -20,7 +24,7 @@ build:
  stage: build
#  variables:
#    CC: clang
#    CXX: clang++
#    CXX: clang++  script:
  script:
  - echo $CXX
  - cmake -Bbuild -H. -DCPPDUALS_TESTING=ON
@@ -46,7 +50,7 @@ cover:
  - cmake -Bbuild-cov -H. -DCODE_COVERAGE=ON -DCPPDUALS_TESTING=ON
  - cmake --build build-cov --target cov
  - cmake --build build-cov --target cov-html
  coverage: '/Total:|\w*\d+\.\d+/'
  coverage: "/Total:|\\w*\\d+\\.\\d+/"
  artifacts:
    expire_in: 1 day
    paths:
@@ -61,7 +65,7 @@ pages:
  - cmake --build build --target cov-html
  - mv build/docs public/
  - mv build/coverage public/
  coverage: '/Total:|\w*\d+\.\d+/'
  coverage: "/Total:|\\w*\\d+\\.\\d+/"
  artifacts:
    paths:
    - public
@@ -75,7 +79,7 @@ publish:
  environment:
    name: publish
  only:
  - /^v\d+\.\d+\.\d+$/
  - "/^v\\d+\\.\\d+\\.\\d+$/"
  except:
  - branches
  before_script:
@@ -85,3 +89,11 @@ publish:
#  - tar czvhf cppduals-h-${CI_BUILD_TAG#v}.tgz cppduals-h-${CI_BUILD_TAG#v}/duals cppduals-h-${CI_BUILD_TAG#v}/CMakeLists.txt
  - tar czvf cppduals-h-${CI_BUILD_TAG#v}.tgz duals CMakeLists.txt
  - ./doc/gitlab-release --message "Release ${CI_BUILD_TAG}" cppduals-h-${CI_BUILD_TAG#v}.tgz

sast:
  variables:
    SAST_DEFAULT_ANALYZERS: flawfinder
  stage: test

include:
- template: Security/SAST.gitlab-ci.yml