-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.gitlab-ci.yml
92 lines (84 loc) · 2.77 KB
/
.gitlab-ci.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
stages:
- update_simka_sq_image
- analysis
- aggregate
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
#########################################################################################################
sonar:analysis:
stage: analysis
image: $CI_REGISTRY_IMAGE/simka_sq:latest
script:
- echo "Launching sonar:analysis diagnostics..."
- scripts/sonarqube_diags/analysis.sh > analysis.log
- mkdir -p public/doc
- mv coverage-html public/doc/lcov # for gitlabpages publication
tags:
#- simka-igrida
- large
cache: {}
artifacts:
paths:
- build/
- analyzer_reports/
- simka-scan-build-cmake.log
- simka-scan-build-make.log
- gcov.xml
- simka-clang-tidy-report.log
- compile_commands.json
- simka-cppcheck.xml
- simka-rats.xml
- analysis.log
- public/
when: always # useful to debug
expire_in: 5 days
#########################################################################################################
sonar:aggregate:
stage: aggregate
image: $CI_REGISTRY_IMAGE/simka_sq:latest
script:
- echo "Launching sonar:aggregate task..."
- echo "====================="; pwd; ls -atlhrsF; echo "====================="
- ls analyzer_reports/*/*.plist
- sonar-scanner -X -Dsonar.login=$SONARQUBE_LOGIN -Dsonar.verbose=true -Dsonar.showProfiling=true &> sonar-scanner.log
tags:
#- simka-igrida
artifacts:
paths:
- sonar-scanner.log
when: always # useful to debug
expire_in: 5 days
##################################################################################################################################################################################################################
# Ref. https://gitlab.inria.fr/help/ci/docker/using_docker_build.md#making-docker-in-docker-builds-faster-with-docker-layer-caching
update_simka_sq_image:
stage: update_simka_sq_image
image: docker
tags:
#- simka-igrida
- large
services:
- docker:19.03.12-dind
script:
- echo "Launching update_ci_image job..."
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE/simka_sq:latest || true
- docker --version
- cd scripts/sonarqube_diags
- docker build -f Dockerfile.sq --cache-from $CI_REGISTRY_IMAGE/simka_sq:latest --tag $CI_REGISTRY_IMAGE/simka_sq:latest .
- docker push $CI_REGISTRY_IMAGE/simka_sq:latest
- docker image ls
when: manual
pages:
image: $CI_REGISTRY_IMAGE/simka_sq:latest
stage: deploy
script:
- mkdir -p public/doc
- test -d build || mkdir build
- cd build
- cmake --target doc-gatb-simka ..
- make doc-gatb-simka
- mv doc/html ../public/doc/doxygen
artifacts:
paths:
- public