forked from Tatoeba/tatoeba2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
29 lines (29 loc) · 970 Bytes
/
Jenkinsfile
File metadata and controls
29 lines (29 loc) · 970 Bytes
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
pipeline {
agent any
stages {
stage('Check') {
steps {
sh './check.sh'
}
}
stage('Build') {
steps {
sh 'composer install'
sh 'cp config/app_local.php.template config/app_local.php'
sh 'sed -i "s/{{mysql_test_user}}/jenkins/" config/app_local.php'
sh 'sed -i "s/{{mysql_test_password}}/cakephp_jenkins/" config/app_local.php'
sh 'sed -i "s/{{mysql_test_db_name}}/jenkins_test/" config/app_local.php'
sh 'sed -i "s/{{security_salt}}/nCwygQoRC5EgFHDRNkdWS6hps74V3y9Z/" config/app_local.php'
sh 'bin/cake asset_compress build -f'
}
}
stage('Test') {
steps {
sh 'mysql -u jenkins -pcakephp_jenkins -e \'DROP DATABASE IF EXISTS jenkins_test; CREATE DATABASE jenkins_test\';'
sh 'vendor/bin/phpunit 2> stderr.log'
// Make sure tests did not produce any notice/error
sh '! grep . stderr.log'
}
}
}
}