-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
68 lines (64 loc) · 2.13 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
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 'coverage/junit-report.xml'
sh "test ${resultBeforeTests} == ${currentBuild.currentResult}"
cobertura coberturaReportFile: 'coverage/cobertura-coverage.xml', enableNewApi: false
recordIssues(
enabledForFailure: true, aggregatingResults: false,
tools: [
checkStyle(pattern: 'css-lint-report.xml', reportEncoding: 'UTF-8', id: 'checkstyle-css', name: 'CSS lint'),
checkStyle(pattern: 'ts-lint-report.xml', reportEncoding: 'UTF-8', id: 'checkstyle-ts', name: 'TS lint'),
],
qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
)
} 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()
}
}
}
}