Generate stuff report before tests
parent
e675af2b24
commit
e6024eb110
|
@ -46,11 +46,11 @@ pipeline {
|
|||
steps {
|
||||
// Install dependencies
|
||||
sh """
|
||||
rm -rf ./report
|
||||
docker compose exec php composer install
|
||||
docker compose exec php php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
docker compose exec php php bin/console doctrine:migrations:migrate --no-interaction
|
||||
docker compose exec php php bin/console doctrine:fixtures:load --no-interaction
|
||||
docker compose exec php mkdir -p /report
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
@ -59,19 +59,9 @@ pipeline {
|
|||
// Run tests
|
||||
sh """
|
||||
docker compose exec php bin/phpunit --log-junit /report/phpunit.xml
|
||||
docker compose cp php:/report/phpunit.xml ./phpunit.xml
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage ("Delete Image") {
|
||||
steps {
|
||||
script {
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
|
||||
sh "docker rmi ${DOCKER_IDENTITY}"
|
||||
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Publish Image") {
|
||||
steps {
|
||||
script {
|
||||
|
@ -86,14 +76,16 @@ pipeline {
|
|||
}
|
||||
post {
|
||||
always {
|
||||
// Publicar los resultados de las pruebas de PHPUnit
|
||||
// Publish JUnit test results
|
||||
xunit (
|
||||
thresholds: [ skipped(failureThreshold: '0'), failed(failureThreshold: '0') ],
|
||||
thresholds: [ skipped(failureThreshold: '0') , failed(failureThreshold: '0') ],
|
||||
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
|
||||
)
|
||||
// Remove containers
|
||||
sh 'docker compose -f ${DOCKER_COMPOSE_FILE} down'
|
||||
sh 'docker compose -f ${DOCKER_COMPOSE_FILE} rm -f'
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
|
||||
sh "docker rmi ${DOCKER_IDENTITY}"
|
||||
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ services:
|
|||
networks:
|
||||
- ogcore-network
|
||||
image: ogcore-php:static
|
||||
volumes:
|
||||
- ./report:/report/
|
||||
|
||||
volumes:
|
||||
database_data:
|
||||
|
|
Loading…
Reference in New Issue