gitlab-ultimate.gitlab-ci.yml 1.39 KB
Newer Older
1
2
include:
  - template: Dependency-Scanning.gitlab-ci.yml
3
  - template: SAST.gitlab-ci.yml
4
5
  - template: License-Management.gitlab-ci.yml

6
7
# --------------------------------------------------------------------------------

8
.ultimate-scanner-config:
9
  stage: test
10
  tags: ['docker-runner']
11
12
  cache:
    paths:
13
      - $CI_PROJECT_DIR/.m2/repository
14

15
  variables:
16
    MAVEN_CLI_OPTS: "--batch-mode --settings=$CI_PROJECT_DIR/.mvn/community-maven.settings.xml -DskipTests=true"
17
    DS_DISABLE_DIND: "true"
18
    SAST_DISABLE_DIND: "true"
19

20
21
  # We need to make sure both directories exist, then we can copy files over
  # Since it is a separate volume, mv offers no advantages. tar | tar, plus rm, is the fastest execution
22
  before_script:
23
24
    - mkdir -p ~/.m2 $CI_PROJECT_DIR/.m2
    - tar -cC $CI_PROJECT_DIR/.m2 repository | tar -xC ~/.m2
25
    - rm -rf $CI_PROJECT_DIR/.m2/repository
26

27
  # Copy the repository back to the cache area
28
  after_script:
29
    - tar -cC ~/.m2 repository | tar -xC $CI_PROJECT_DIR/.m2
30

31
# --------------------------------------------------------------------------------
32

33
34
dependency_scanning:
  extends: .ultimate-scanner-config
35

36
37
38
39
40
sast:
  extends: .ultimate-scanner-config

license_management:
  extends: .ultimate-scanner-config
41
42
43
44
45

# --------------------------------------------------------------------------------

gemnasium-maven-dependency_scanning:
  image: registry.gitlab.com/divido/gemnasium-maven:jdk-8