From 3db25efbcffafd430dc7c7e9c0c59f9a964ade7a Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 25 Sep 2024 16:11:26 +0200 Subject: [PATCH] Clean workspace and add some comments --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7575da5..7da3621 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' } } }