Creating first Jenkinsfile for testing
testing/ogcore-api/pipeline/head There was a failure building this commit Details

helpers/ci-integration
Nicolas Arenas 2024-09-25 14:01:35 +02:00
parent 939a15ad2a
commit 4523135041
1 changed files with 29 additions and 0 deletions

29
Jenkinsfile vendored 100644
View File

@ -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'
}
}
}
}