aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 93c2add2ae8c8e96cc3c9988e070b65b8958a03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
stages:
  - build
  - sast

build-debian:
  image: debian:stable
  script:
    - apt-get update -qq && apt-get install -y -qq coreutils make autoconf automake gcc pkg-config libseccomp-dev libssh-dev valgrind
    - ./autogen.sh
    - ./configure
    - make
  stage: build
  artifacts:
    paths:
      - ./src/potd
      - ./config.log

build-arch:
  image: base/archlinux
  script:
    - pacman -Syu --noconfirm coreutils make autoconf automake gcc pkg-config libseccomp libssh valgrind
    - ./autogen.sh
    - ./configure
    - make
  stage: build
  artifacts:
    paths:
      - ./src/potd
      - ./config.log

sast:
  image: docker:stable
  only:
    variables:
      - $DO_SAST
  variables:
    DOCKER_DRIVER: overlay2
  allow_failure: true
  services:
    - docker:stable-dind
  stage: build
  script:
    - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
    - docker run
        --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
        --volume "$PWD:/code"
        --volume /var/run/docker.sock:/var/run/docker.sock
        "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
  artifacts:
    paths: [gl-sast-report.json]