Skip to content
Snippets Groups Projects
Commit 63b6336d authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[upd] update Jenkinsfile

parent 0d6e53cc
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ pipeline {
stage ('checkout') {
agent any
steps {
echo "Phase 1 : checkout"
echo "Phase 1 : Checkout"
checkout scmGit(branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://gitlab.imt-atlantique.fr/f21munie/project_jenkins_php.git']])
}
}
......@@ -18,16 +18,16 @@ pipeline {
stage('tests') {
parallel {
stage('hadolint') {
// Phase 2 : agent Dockerfile image hadolint
// Phase 2 : Agent Dockerfile image hadolint
agent {
docker {
image 'docker.io/hadolint/hadolint:v2.12.0-alpine'
}
}
steps {
echo 'Phase 3 : création hadolint.json'
echo 'Phase 3 : Création hadolint.json'
sh 'touch hadolin.json'
echo 'Phase 4 : exécution hadolint sur les deux Dockerfiles'
echo 'Phase 4 : Exécution hadolint sur les deux Dockerfiles'
sh 'find ./ -iname "Dockerfile" | xargs hadolint -f json | tee -a hadolint.json'
recordIssues qualityGates: [[threshold: QUALITY_DOCKER, type: 'TOTAL', unstable: false]], tools: [hadoLint(pattern: 'hadolint.json')]
sh 'rm hadolint.json'
......@@ -35,7 +35,7 @@ pipeline {
}
stage('tests statiques') {
// "Phase 5 : agent Dockerfile intégration"
// "Phase 5 : Agent Dockerfile intégration"
agent {
dockerfile {
dir 'build/docker/phpunit'
......@@ -43,7 +43,7 @@ pipeline {
}
}
steps {
echo "Phase 6 : préparation de l'environnement"
echo "Phase 6 : Préparation de l'environnement"
sh 'ls -l'
sh 'make clean'
sh 'ls -l'
......@@ -62,15 +62,15 @@ pipeline {
}
}
steps {
echo "Phase 9 : préparation de l'environnement"
echo "Phase 9 : Préparation de l'environnement"
sh 'ls -l'
sh 'make clean'
sh 'ls -l'
echo "Phase 10 : Réalisation des tests unitaires"
sh 'make tests_unitaires'
echo "Phase 11 : publication du résultat des tests junit"
echo "Phase 11 : Publication du résultat des tests junit"
xunit checksName: '', tools: [PHPUnit(excludesPattern: '', pattern: 'build/logs/junit.xml', stopProcessingIfError: true)]
echo "Phase 12 : publication de la couverture de code"
echo "Phase 12 : Publication de la couverture de code"
clover(cloverReportDir: 'build/coverage', cloverReportFileName: 'coverage.xml',
healthyTarget: [methodCoverage: 70, conditionalCoverage: 80, statementCoverage: CODE_COVERAGE],
unhealthyTarget: [methodCoverage: 50, conditionalCoverage: 50, statementCoverage: 50],
......@@ -95,7 +95,7 @@ pipeline {
}
post {
always {
echo "Phase 15 : Nettoyer l'espace de travail"
echo "Phase 15 : Nettoyage de l'espace de travail"
cleanWs()
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment