summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2019-05-03 19:04:05 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-05-10 08:19:17 +0000
commitbe005e53a4b15eb3e6cd3f0f08d3bba5d3925210 (patch)
tree48145bc44b700c0bae75c742f0d9323981f25ad4 /.gitlab-ci.yml
parent5b2a1a39015b2261d244127e8c604144d49220cf (diff)
downloadsamba-be005e53a4b15eb3e6cd3f0f08d3bba5d3925210.tar.gz
.gitlab-ci.yml: add pages job to generate coverage report and publish to gitlab pages
- add new stage "report" - add pages job in "report" stage to collect .info files, generate html report and publish to gitlab pages. - only trigger when SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == '--enable-coverage' Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5af472bbd6d..1971f84e70f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@
stages:
- images
- build
+ - report
variables:
GIT_STRATEGY: fetch
@@ -180,6 +181,50 @@ samba-nt4:
samba-schemaupgrade:
extends: .private_template
+# 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
+pages:
+ image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
+ stage: report
+ tags:
+ - docker
+ - shared
+ dependencies: # tell gitlab to download artifacts for these jobs
+ - samba
+ - samba-ad-dc-1
+ - samba-ad-dc-2
+ - samba-ad-dc-3
+ - samba-ad-dc-4
+ - samba-ad-dc-5
+ - samba-ad-dc-6
+ - samba-ad-dc-backup
+ - samba-ad-dc-ntvfs
+ - samba-ad-member
+ - samba-ctdb
+ - samba-fileserver
+ - samba-libs
+ - samba-none-env
+ - samba-nopython
+ - samba-nopython-py2
+ - samba-nt4
+ - samba-schemaupgrade
+ - samba-static
+ - samba-systemkrb5
+ - samba-xc
+ # - ctdb # TODO
+ - others
+ script:
+ - ./configure.developer
+ - make -j
+ - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
+ - genhtml all.info --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
+ artifacts:
+ expire_in: 30 days
+ paths:
+ - public
+ only:
+ variables:
+ - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage"
+
#
# We build samba-o3 on all supported distributions
#