diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..30daa2d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +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' + sh 'docker exec ogcore-php php bin/console app:load-default-user-groups' + } + } + stage('Tests') { + steps { + sh 'docker compose exec php bin/phpunit' + } + } + } +}