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