-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
61 lines (56 loc) · 1.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
pipeline {
agent {
docker {
image "node:18-alpine"
}
}
environment {
HOME = '/var/lib/jenkins/workspace/www.trelobifteki.com'
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Check for vulnerabilities') {
steps {
sh 'npm audit --parseable --production || exit 0'
}
}
stage('download dependencies') {
steps {
sh 'npm ci'
sh 'npm outdated || exit 0'
}
}
stage('Check linting') {
steps {
sh 'npm run lint'
sh 'npm run lint:markdown'
}
}
stage('Check unit:test') {
steps {
sh 'npm run test:unit -- --ci --coverage'
}
post {
always {
junit 'junit.xml'
cobertura coberturaReportFile: 'coverage/cobertura-coverage.xml'
}
}
}
stage('Build') {
steps {
sh 'npm run build'
}
}
stage('Check unit:e2e') {
steps {
echo 'omit this for now...'
/* sh 'npm run test:e2e -- --headless --url https://www.trelobifteki.com --config video=false || exit 0' */
}
}
}
}