ogcore/Jenkinsfile

37 lines
1.0 KiB
Groovy

pipeline {
agent {
node {
label 'jenkins-slave'
}
}
stages {
stage('Build Environmen') {
steps {
sh 'docker compose up --build -d'
}
}
stage('Install dependencies') {
steps {
sh 'docker exec ogcore-php composer install'
sh 'docker exec ogcore-php php bin/console lexik:jwt:generate-keypair --overwrite'
sh 'docker exec ogcore-php php bin/console doctrine:migrations:migrate --no-interaction'
sh 'docker exec ogcore-php php bin/console doctrine:fixtures:load --no-interaction'
}
}
stage('Tests') {
steps {
sh 'docker compose exec php bin/phpunit --log-junit phpunit.xml'
}
}
}
post {
always {
xunit (
thresholds: [ skipped(failureThreshold: 0) , failed(failureThreshold: 0) ],
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
)
}
}
}