Compare commits
5 Commits
release-1.
...
9bb9ab8e51
| Author | SHA1 | Date | |
|---|---|---|---|
| 9bb9ab8e51 | |||
| b15d8458c8 | |||
| 100b75a05a | |||
| d57b26c8c8 | |||
| d071f737bb |
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@@ -9,6 +9,7 @@ pipeline {
|
||||
|
||||
environment {
|
||||
REGISTRY = "localhost:5000"
|
||||
SERVER_IP = "192.168.1.95"
|
||||
|
||||
BACKEND_IMAGE = "${REGISTRY}/the-tip-top/backend"
|
||||
FRONTEND_IMAGE = "${REGISTRY}/the-tip-top/frontend"
|
||||
@@ -48,7 +49,7 @@ pipeline {
|
||||
env.COMPOSE_PROJECT = 'tiptop-dev'
|
||||
env.DEPLOY_NETWORK = 'tiptop-dev'
|
||||
|
||||
env.FRONTEND_API_URL = 'http://192.168.1.23:5001'
|
||||
env.FRONTEND_API_URL = "http://${SERVER_IP}:5001"
|
||||
|
||||
} else if (env.BRANCH_NAME.startsWith('release-')) {
|
||||
env.DEPLOY_ENABLED = 'true'
|
||||
@@ -58,7 +59,7 @@ pipeline {
|
||||
env.COMPOSE_PROJECT = 'tiptop-preprod'
|
||||
env.DEPLOY_NETWORK = 'tiptop-preprod'
|
||||
|
||||
env.FRONTEND_API_URL = 'http://192.168.1.23:5002'
|
||||
env.FRONTEND_API_URL = "http://${SERVER_IP}:5002"
|
||||
|
||||
} else if (env.BRANCH_NAME == 'main') {
|
||||
env.DEPLOY_ENABLED = 'true'
|
||||
@@ -68,7 +69,7 @@ pipeline {
|
||||
env.COMPOSE_PROJECT = 'tiptop-prod'
|
||||
env.DEPLOY_NETWORK = 'tiptop-prod'
|
||||
|
||||
env.FRONTEND_API_URL = 'http://192.168.1.23:5003'
|
||||
env.FRONTEND_API_URL = "http://${SERVER_IP}:5003"
|
||||
|
||||
} else {
|
||||
env.DEPLOY_ENABLED = 'false'
|
||||
@@ -84,6 +85,8 @@ pipeline {
|
||||
echo "Tag Docker : ${env.IMAGE_TAG}"
|
||||
echo "Environnement : ${env.DEPLOY_ENV}"
|
||||
echo "Déploiement activé : ${env.DEPLOY_ENABLED}"
|
||||
echo "Serveur : ${env.SERVER_IP}"
|
||||
echo "API frontend : ${env.FRONTEND_API_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,6 +165,21 @@ pipeline {
|
||||
"
|
||||
'''
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit(
|
||||
testResults: 'backend/test-results/*.xml',
|
||||
allowEmptyResults: true
|
||||
)
|
||||
|
||||
archiveArtifacts(
|
||||
artifacts: 'backend/coverage/**',
|
||||
fingerprint: true,
|
||||
allowEmptyArchive: true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Frontend - Lint et Build') {
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
module.exports = {
|
||||
testEnvironment: "node",
|
||||
|
||||
// Dossier des tests
|
||||
testMatch: ["**/tests/**/*.test.js"],
|
||||
|
||||
// Nettoyage des mocks entre les tests
|
||||
clearMocks: true,
|
||||
|
||||
// Timeout (utile pour Prisma / DB)
|
||||
testTimeout: 10000,
|
||||
|
||||
// Affichage des logs de test
|
||||
verbose: true,
|
||||
verbose: true,
|
||||
|
||||
// Couverture de code (optionnel mais bon pour soutenance)
|
||||
collectCoverage: true,
|
||||
coverageDirectory: "coverage",
|
||||
|
||||
coverageReporters: [
|
||||
"text",
|
||||
"lcov",
|
||||
"html"
|
||||
],
|
||||
|
||||
// Fichiers à ignorer
|
||||
testPathIgnorePatterns: ["/node_modules/"],
|
||||
reporters: [
|
||||
"default",
|
||||
[
|
||||
"jest-junit",
|
||||
{
|
||||
outputDirectory: "./test-results",
|
||||
outputName: "junit.xml"
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
// Configuration pour Jest avec Supertest
|
||||
//setupFilesAfterEnv: ["<rootDir>/tests/setup.js"]
|
||||
};
|
||||
testPathIgnorePatterns: ["/node_modules/"]
|
||||
};
|
||||
|
||||
51
backend/package-lock.json
generated
51
backend/package-lock.json
generated
@@ -25,6 +25,7 @@
|
||||
"cross-env": "^10.1.0",
|
||||
"dotenv": "^17.4.2",
|
||||
"jest": "^30.4.2",
|
||||
"jest-junit": "^17.0.0",
|
||||
"nodemon": "^3.1.14",
|
||||
"supertest": "^7.2.2"
|
||||
}
|
||||
@@ -4457,6 +4458,22 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-junit": {
|
||||
"version": "17.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-17.0.0.tgz",
|
||||
"integrity": "sha512-RYWCkq4j59gUXj5DsgbIE7xFBZzu1gtibPhyjSjMmGaOTLnqlXhg7x9zuGCwgbCuMAyoyvk0Mi8wSrRR5uOeLA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mkdirp": "^1.0.4",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"uuid": "^14.0.0",
|
||||
"xml": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-leak-detector": {
|
||||
"version": "30.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.4.1.tgz",
|
||||
@@ -5375,6 +5392,19 @@
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -6836,6 +6866,20 @@
|
||||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "14.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz",
|
||||
"integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa",
|
||||
"https://github.com/sponsors/ctavan"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist-node/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
|
||||
@@ -6942,6 +6986,13 @@
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xml": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
|
||||
"integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"cross-env": "^10.1.0",
|
||||
"dotenv": "^17.4.2",
|
||||
"jest": "^30.4.2",
|
||||
"jest-junit": "^17.0.0",
|
||||
"nodemon": "^3.1.14",
|
||||
"supertest": "^7.2.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user