-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
35 lines (33 loc) · 1.08 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
pipeline {
agent any
stages {
stage('lint') {
steps {
sh 'docker run -i --rm -v $PWD:/app milchundzucker/php-parallel-lint:latest /app/src /app/bin'
}
}
stage('build-image') {
steps {
sh 'docker build -t perform --build-arg PHP_VERSION=7.1 .'
sh 'docker run -i --rm perform php -v'
}
}
stage('build') {
steps {
sh 'docker run -i --rm -u $(id -u):$(id -g) -v $PWD:/code perform bin/generate-root-composer-config.php'
sh 'test -d ~/.composer || mkdir -v ~/.composer'
sh 'docker run -i --rm -u $(id -u):$(id -g) -v $PWD:/app -v ~/.composer:/tmp composer update --profile --ignore-platform-reqs'
}
}
stage('test') {
steps {
sh 'docker run -i --rm -u $(id -u):$(id -g) -v $PWD:/code perform vendor/bin/phpunit --log-junit test_results.xml'
}
}
}
post {
always {
junit 'test_results.xml'
}
}
}