forked from Tatoeba/tatoeba2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
27 lines (27 loc) · 916 Bytes
/
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
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'composer install'
}
}
stage('Check assets') {
steps {
// Check for flags that are too big
sh '! find webroot/img/flags/ -name "*.svg" -size +3k | grep .'
}
}
stage('Test') {
steps {
sh 'mysql -u jenkins -pcakephp_jenkins -e \'DROP DATABASE IF EXISTS jenkins_test; CREATE DATABASE jenkins_test\';'
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 'vendor/bin/phpunit'
}
}
}
}