-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.ska.yml
51 lines (45 loc) · 1.55 KB
/
.gitlab-ci.ska.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
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
# At SKA GitLab, docker-in-docker jobs require a service.
.dind:
services:
- docker:20.10-dind
default:
tags:
- ska-default # Use SKAO runners instead of standard gitlab.com runners.
include:
- .gitlab-ci.common.yml
# Collects metrics and creates badges.
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/finaliser.gitlab-ci.yml"
pages:
stage: pages
needs: ["versioning","coverage-2204"]
image: $BASE_IMAGE_2204
variables:
OUTPUT: public/$CI_COMMIT_REF_SLUG
script:
- echo Deploying GitLab pages to $CI_PAGES_URL/$CI_COMMIT_REF_SLUG
- mkdir -p $OUTPUT/coverage
- gcovr -e 'build/.*' -a build/coverage.json --html-details $OUTPUT/index.html
artifacts:
name: $CI_COMMIT_REF_SLUG
paths:
- public
expire_in: 1 week
# Puts xml files in the proper directories for the SKAO finaliser job.
# See https://developer.skatelescope.org/en/latest/tools/ci-cd/continuous-integration.html#automated-collection-of-ci-health-metrics-as-part-of-the-ci-pipeline
collect-metrics:
stage: pages
needs: ["coverage-2204"]
before_script:
- apt-get update
- apt-get install -y -qq python3
script:
- mkdir -p build/reports
- cp build/coverage.xml build/reports/code-coverage.xml
# Combine unit test xml files into one large file.
- python3 scripts/junit-merge.py build/reports/unit-tests.xml build/*test*.xml
artifacts:
paths:
- build/reports/*.xml