Clean workspace and add some comments
testing/ogcore-api/pipeline/head There was a failure building this commit Details

helpers/ci-integration
Nicolas Arenas 2024-09-25 16:11:26 +02:00
parent 64848705b9
commit 3db25efbcf
1 changed files with 7 additions and 0 deletions

7
Jenkinsfile vendored
View File

@ -8,11 +8,13 @@ pipeline {
stages {
stage('Build Environmen') {
steps {
# Build environment
sh 'docker compose up --build -d'
}
}
stage('Install dependencies') {
steps {
# Install dependencies
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'
@ -21,16 +23,21 @@ pipeline {
}
stage('Tests') {
steps {
# Run tests
sh 'docker compose exec php bin/phpunit --log-junit phpunit.xml'
}
}
}
post {
always {
# Publish JUnit test results
xunit (
thresholds: [ skipped(failureThreshold: 0) , failed(failureThreshold: 0) ],
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
)
# Remove containers
sh 'docker compose down'
sh 'docker compose rm -f'
}
}
}