forked from LiskArchive/lisk-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.nightly
37 lines (37 loc) · 1.27 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
pipeline {
agent { node { label 'node-v8-06' } }
parameters {
string(name: 'JENKINS_PROFILE', defaultValue: 'jenkins', description: 'To build cache dependencies and run slow tests, change this value to jenkins-extensive.', )
string(name: 'LOG_LEVEL', defaultValue: 'error', description: 'To get desired build log output change the log level', )
string(name: 'FILE_LOG_LEVEL', defaultValue: 'error', description: 'To get desired file log output change the log level', )
string(name: 'LOG_DB_EVENTS', defaultValue: 'false', description: 'To get detailed info on db events log.', )
string(name: 'SILENT', defaultValue: 'true', description: 'To turn off test debug logs.', )
string(name: 'NUMBER_OF_TRANSACTIONS', defaultValue: '1000', description: 'Number of transaction to process for stress tests.', )
}
stages {
stage('Install dependencies') {
steps {
sh 'npm install --verbose'
}
}
stage('Reset database and config') {
steps {
sh '''
sudo service postgresql restart
'''
}
}
stage('Run network tests with syncing and broadcasting') {
steps {
sh 'npm test -- mocha:extensive:network'
}
}
}
post {
always {
sh './node_modules/.bin/pm2 kill'
archiveArtifacts artifacts: "logs/*", allowEmptyArchive: true
cleanWs()
}
}
}