rvr-nextgen/Jenkinsfile

66 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-04-08 00:42:55 +02:00
pipeline {
agent {
node {
label 'rvr'
customWorkspace 'workspace/rvr'
}
}
stages {
stage('Install composer') {
environment {
COMPOSER_HOME="${WORKSPACE}/.composer"
}
agent {
dockerfile {
2023-09-28 12:03:23 +02:00
filename 'docker/Dockerfile'
2023-04-08 00:42:55 +02:00
dir '.'
2023-09-28 12:03:23 +02:00
additionalBuildArgs '--target rvr_base'
2023-04-08 00:42:55 +02:00
reuseNode true
}
}
steps {
sh 'composer install'
}
}
stage('Unit Testing') {
agent {
dockerfile {
2023-09-28 12:03:23 +02:00
filename 'docker/Dockerfile'
2023-04-08 00:42:55 +02:00
dir '.'
2023-09-28 12:03:23 +02:00
additionalBuildArgs '--target rvr_base'
2023-04-08 00:42:55 +02:00
reuseNode true
}
}
steps {
sh 'vendor/bin/phpunit --log-junit unit_test_results.xml --testdox tests'
}
post {
2023-05-28 16:39:38 +02:00
always {
2023-04-08 00:42:55 +02:00
archiveArtifacts 'unit_test_results.xml'
}
}
}
stage('Static Code Analysis') {
agent {
dockerfile {
2023-09-28 12:03:23 +02:00
filename 'docker/Dockerfile'
2023-04-08 00:42:55 +02:00
dir '.'
2023-09-28 12:03:23 +02:00
additionalBuildArgs '--target rvr_base'
2023-04-08 00:42:55 +02:00
reuseNode true
}
}
steps {
sh 'php vendor/bin/phpstan analyse -c phpstan.neon --error-format=prettyJson > static_code_analysis_results.json'
}
post {
2023-05-28 16:39:38 +02:00
always {
2023-04-08 00:42:55 +02:00
archiveArtifacts 'static_code_analysis_results.json'
}
}
}
}
}