forked from Enalean/tuleap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile-nightly
114 lines (107 loc) · 3.69 KB
/
Jenkinsfile-nightly
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
#!/usr/bin/env groovy
def actions
pipeline {
agent {
label 'docker'
}
triggers { cron('H 5 * * 1-5') }
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Prepare') {
steps {
dir ('results') {
deleteDir()
}
script { actions = load 'sources/tests/actions.groovy' }
dir ('sources') {
withCredentials([
usernamePassword(
credentialsId: 'nexus.enalean.com_readonly',
passwordVariable: 'NPM_PASSWORD',
usernameVariable: 'NPM_USER'
),
string(credentialsId: 'github-token-composer', variable: 'COMPOSER_GITHUB_AUTH')
]) {
script { actions.prepareSources('dev') }
}
}
}
}
stage('Unit tests PHP') {
steps { script { actions.runPHPUnitTests('82', false) } }
post { always { junit 'results/ut-phpunit/*/phpunit_tests_results.xml' } }
}
stage ('Unit tests JS/TS with coverage') {
steps { script { actions.runJSUnitTests(true) } }
post {
always {
junit 'results/js-test-results/junit-*.xml'
}
}
}
stage('E2E tests') {
options { retry(1) }
steps {
script { actions.runEndToEndTests('full', 'mysql80') }
}
post {
always {
junit 'results/e2e/full/*.xml'
}
}
}
stage ('PHP 8.3') {
failFast false
parallel {
stage('Unit tests') {
steps { script { actions.runPHPUnitTests('83', false) } }
post { always { junit 'results/ut-phpunit/*/phpunit_tests_results.xml' } }
}
stage('DB/Integration') {
steps { script { actions.runDBTests('mysql80', '83') } }
post { always { junit 'results/db/*/db_tests.xml' } }
}
stage('REST') {
steps { script { actions.runRESTTests('mysql80', '83') } }
post { always { junit 'results/api-rest/*/*' } }
}
}
}
stage ('MySQL 8.4') {
failFast false
parallel {
stage('DB/Integration') {
steps { script { actions.runDBTests('mysql84', '82') } }
post { always { junit 'results/db/*/db_tests.xml' } }
}
stage('REST') {
steps { script { actions.runRESTTests('mysql84', '82') } }
post { always { junit 'results/api-rest/*/*' } }
}
}
}
}
post {
always {
archiveArtifacts allowEmptyArchive: true, artifacts: 'results/'
}
failure {
withCredentials([string(credentialsId: 'email-notification-rd-team', variable: 'email')]) {
mail to: email,
subject: "${currentBuild.fullDisplayName} is broken",
body: "See ${env.BUILD_URL}"
}
}
unstable {
withCredentials([string(credentialsId: 'email-notification-rd-team', variable: 'email')]) {
mail to: email,
subject: "${currentBuild.fullDisplayName} is unstable",
body: "See ${env.BUILD_URL}"
}
}
}
}