-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
118 lines (108 loc) · 4.66 KB
/
Jenkinsfile
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
pipeline {
agent { label 'piglet' }
options {
copyArtifactPermission('/iossifovlab/*,/seqpipe/*');
disableConcurrentBuilds()
}
environment {
BUILD_SCRIPTS_BUILD_DOCKER_REGISTRY_USERNAME = credentials('jenkins-registry.seqpipe.org.user')
BUILD_SCRIPTS_BUILD_DOCKER_REGISTRY_PASSWORD_FILE = credentials('jenkins-registry.seqpipe.org.passwd')
SONARQUBE_DEFAULT_TOKEN=credentials('sonarqube-default')
}
stages {
stage('Start') {
steps {
zulipSend(
message: "Started build #${env.BUILD_NUMBER} of project ${env.JOB_NAME} (${env.BUILD_URL})",
topic: "${env.JOB_NAME}")
}
}
stage('Generate stages') {
steps {
sh "./build.sh preset:slow build_no:${env.BUILD_NUMBER} generate_jenkins_init:yes"
script {
load('Jenkinsfile.generated-stages')
}
}
}
}
post {
always {
script {
try {
discoverGitReferenceBuild(latestBuildIfNotFound: true, maxCommits: 400, skipUnknownCommits: true)
resultBeforeTests = currentBuild.currentResult
junit 'test-results/wdae-junit.xml, test-results/dae-junit.xml, test-results/dae-tests-junit.xml, test-results/wdae-tests-junit.xml'
sh "test ${resultBeforeTests} == ${currentBuild.currentResult}"
cobertura coberturaReportFile: 'test-results/coverage.xml',
enableNewApi: false, onlyStable: false, sourceEncoding: 'ASCII'
recordIssues(
enabledForFailure: true, aggregatingResults: false,
tools: [
flake8(pattern: 'test-results/ruff_report', reportEncoding: 'UTF-8', id: 'ruff', name: 'Ruff'),
myPy(pattern: 'test-results/mypy_dae_report', reportEncoding: 'UTF-8', id: 'mypy-dae', name: 'MyPy - dae'),
myPy(pattern: 'test-results/mypy_dae_tests_report', reportEncoding: 'UTF-8', id: 'mypy-dae-tests', name: 'MyPy - dae integration'),
myPy(pattern: 'test-results/mypy_wdae_report', reportEncoding: 'UTF-8', id: 'mypy-wdae', name: 'MyPy - wdae'),
myPy(pattern: 'test-results/mypy_impala_report', reportEncoding: 'UTF-8', id: 'mypy-impala', name: 'MyPy - impala'),
myPy(pattern: 'test-results/mypy_impala2_report', reportEncoding: 'UTF-8', id: 'mypy-impala2', name: 'MyPy - impala2'),
myPy(pattern: 'test-results/mypy_gcp_report', reportEncoding: 'UTF-8', id: 'mypy-gcp', name: 'MyPy - GCP'),
pyLint(pattern: 'test-results/pylint_gpf_report', reportEncoding: 'UTF-8')
],
qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
//, ignoreQualityGate: true
//, ignoreFailedBuilds: true
)
publishHTML (target : [allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'test-results/coverage-html',
reportFiles: 'index.html',
reportName: 'gpf-coverage-report',
reportTitles: 'gpf-coverage-report'])
// publishHTML (target : [allowMissing: false,
// alwaysLinkToLastBuild: true,
// keepAll: true,
// reportDir: 'test-results/mypy_dae_html_report',
// reportFiles: 'index.html',
// reportName: 'dae-mypy-report',
// reportTitles: 'dae-mypy-report'])
// publishHTML (target : [allowMissing: false,
// alwaysLinkToLastBuild: true,
// keepAll: true,
// reportDir: 'test-results/mypy_wdae_html_report',
// reportFiles: 'index.html',
// reportName: 'wdae-mypy-report',
// reportTitles: 'wdae-mypy-report'])
// publishHTML (target : [allowMissing: true,
// alwaysLinkToLastBuild: true,
// keepAll: true,
// reportDir: 'test-results/',
// reportFiles: 'bandit_*dae_report.html',
// reportName: 'bandit-dae-report',
// reportTitles: 'bandit-dae-report'])
publishHTML (target : [allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'test-results/',
reportFiles: 'bandit_wdae_report.html',
reportName: 'bandit-wdae-report',
reportTitles: 'bandit-wdae-report'])
} finally {
zulipNotification(
topic: "${env.JOB_NAME}"
)
}
}
}
unstable {
script {
load('build-scripts/libjenkinsfile/zulip-tagged-notification.groovy').zulipTaggedNotification()
}
}
failure {
script {
load('build-scripts/libjenkinsfile/zulip-tagged-notification.groovy').zulipTaggedNotification()
}
}
}
}