-
Notifications
You must be signed in to change notification settings - Fork 57
/
.gitlab-ci.yml
78 lines (70 loc) · 2.78 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
# Copyright 2023-2024 Broadcom
# SPDX-License-Identifier: Apache-2.0
# default image used by all pipelines if not overridden per job
# it is better not to rely on default image and specify image explicitly for each job
image: "python:3.9"
include:
- "cicd/.gitlab-ci-lib.yml"
- "projects/vdk-control-cli/.gitlab-ci.yml"
- "projects/vdk-core/.gitlab-ci.yml"
- "projects/frontend/cicd/.gitlab-ci.yml"
- "projects/vdk-heartbeat/.gitlab-ci.yml"
- "projects/control-service/cicd/.gitlab-ci.yml"
- "projects/vdk-plugins/.plugin-common.yml"
- "projects/vdk-plugins/*/.plugin-ci.yml"
- "projects/vdk-plugins/airflow-provider-vdk/.airflow-ci.yml"
stages:
- build
- publish_artifacts
- pre_release
- pre_release_image
- pre_release_test
- release
- release_image
- coverity-scan
- end
build-check-prerequisites:
stage: build
script:
- ./cicd/build.sh
only:
- external_pull_requests
end:
stage: end
script:
- echo "Noop pipeline to enable merging changes that are not covered by any of the jobs."
only:
refs:
- external_pull_requests
notify_failure:
stage: end
script:
- ./cicd/notify.sh "https://gitlab.com/vmware-analytics/versatile-data-kit/-/pipelines/$CI_PIPELINE_ID \nThe pipeline for the $CI_COMMIT_BRANCH branch has failed.\nPlease take the necessary steps to fix it and document the resolution\n$VDK_CI_FAILURES_PAGE" $VDK_SLACK_NOTIFICATION_HOOK
allow_failure: true
rules:
- if: '$CI_COMMIT_BRANCH != "main"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
when: on_failure
#Coverity Scan for versatile-data-kit repository
coverity-scan:
stage: coverity-scan
image: maven:3.6.3-jdk-11
script:
- wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
- tar xf /tmp/coverity_tool.tgz
- cov-analysis-linux64-*/bin/cov-configure --python
- cov-analysis-linux64-*/bin/cov-build --dir cov-int --no-command --fs-capture-search projects/vdk-plugins
- cov-analysis-linux64-*/bin/cov-build --dir cov-int --no-command --fs-capture-search projects/vdk-core
- cov-analysis-linux64-*/bin/cov-build --dir cov-int --no-command --fs-capture-search projects/vdk-control-cli
- cov-analysis-linux64-*/bin/cov-build --dir cov-int --no-command --fs-capture-search projects/control-service
- tar czf cov-int.tar.gz cov-int
- curl
--form token=$COVERITY_SCAN_TOKEN
--form email=$COVERITY_SCAN_EMAIL
--form [email protected]
--form description="Coverity scan for vdk"
https://scan.coverity.com/builds?project=versatile-data-kit
rules:
- if: $CI_COMMIT_BRANCH == "main" #Mark it as main before merging
- if: $CI_PIPELINE_SOURCE == "schedule" && $IS_COVERITY_SCAN_SCHEDULE == "true"