mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-06 13:11:25 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4aacdc1c28 | |||
| 9e8201a1ec | |||
| 40b2c8d1e5 | |||
| db587ec747 | |||
| e9a30b7bde | |||
| ff1d113698 | |||
| 12a6ad1d61 | |||
| 856443d4ed | |||
| ace4dcbf07 | |||
| 61f63f9dc9 | |||
| d9e998d2ff |
@ -1 +1 @@
|
||||
__version__ = "0.0.5"
|
||||
__version__ = "1.0.0"
|
||||
|
||||
72
CHANGELOG.md
72
CHANGELOG.md
@ -2,77 +2,7 @@
|
||||
|
||||
Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier.
|
||||
|
||||
### [0.0.5](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/compare/0.0.3...0.0.5) (2026-04-05)
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
* **design-system:** add design system documentation and AI agent instructions ([cb76a23](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/cb76a23d02a9c0f27c9403e4d06cebfcc65d886b))
|
||||
|
||||
|
||||
### Nouvelles fonctionnalités
|
||||
|
||||
* Gestion de l'arborescence des documents d'école en fonction des requêtes CRUD [N3WTS-17] ([abb4b52](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/abb4b525b296ba01fce037c6c63fb7766cfbc9b3))
|
||||
* Ajout bouton de refus de dossier avec zone de saisie de motif [N3WTS-2] ([3779a47](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/3779a474171d7df716e3b0d06a26f7f9b69356fa))
|
||||
* Ajout d'un système d'historisation et d'export de données en CSV [N3WTS-5] ([f091fa0](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/f091fa0432135bb5478793ea92b97d13c3c68a2f))
|
||||
* Ajout d'un système de notation par classe et par matière et par élève [N3WTS-6] ([905fa5d](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/905fa5dbfb3d50710a3aa04d9b28664c1c86b991))
|
||||
* Ajout de la commande npm permettant de creer un etablissement ([09b1541](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/09b1541dc83b28dcba0aead633755d58e9a534fa))
|
||||
* Ajout des composants manquant dans le FormTemplateBuilder [N3WTS-17] ([5e62ee5](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/5e62ee510074e30cd33802aae20d3d1c297619a3))
|
||||
* Ajout FormTemplateBuilder [N3WTS-17] ([e89d2fc](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e89d2fc4c34a99c6b67827bb895ad31a5eff10e6))
|
||||
* **backend,frontend:** régénération et visualisation inline de la fiche élève PDF ([e37aee2](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e37aee2abcf7ed69145d217a30e2dce037d933d0))
|
||||
* Changement du rendu de la page des documents + gestion des ([12f5fc7](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/12f5fc7aa9de10fc5591495b9ede478593c1c21a))
|
||||
* creation d'un FormRenderer.js pour creer un formulaire dynamique [NEWTS-17] ([9481a01](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/9481a0132d2e1f18da5fc632d924adde04d316d4))
|
||||
* Début de suppression de docuseal côté Front [#N3WTS-17] ([1e5bc6c](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/1e5bc6ccba9053246e4767aa6c2da46ff776203e)), closes [#N3WTS-17](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/N3WTS-17)
|
||||
* Envoi mail d'inscription au second responsable [N3WTS-1] ([d66db1b](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/d66db1b019f2480a8a418acc982a6f9132ff3342))
|
||||
* Envoi mail d'inscription aux enseignants [N3WTS-1] ([bd7dc2b](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/bd7dc2b0c228b26e31c930342679e30aafa101e1))
|
||||
* Finalisation de la validation / refus des documents signés par les parents [N3WTS-2] ([0501c1d](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/0501c1dd7320d734ba6ae0b93ad4a270b903a5df))
|
||||
* Finalisation formulaire dynamique ([90b0d14](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/90b0d144184a1c402aedfe3f70647c4bb43f8c37))
|
||||
* **frontend:** fusion liste des frais et message compte existant [#NEWTS-9] ([e30a41a](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e30a41a58b199b68eca687a159736b2025e9f22d)), closes [#NEWTS-9](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/NEWTS-9)
|
||||
* **frontend:** refonte mobile planning et ameliorations suivi pedagogique [#NEWTS-4] ([4248a58](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/4248a589c5f300fe0702b1c20cae5abaeba32688)), closes [#NEWTS-4](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/NEWTS-4) [#NEWTS-4](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/NEWTS-4)
|
||||
* Gestion de l'affichage des documents validés et non validés sur la page parent [N3WTS-2] ([4f7d7d0](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/4f7d7d002442bb0cb04063734d97f993a40474a7))
|
||||
* Gestion de la sidebar [N3WTS-8] ([ddcaba3](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/ddcaba382e6573f4a628a691bc0f20226a954fd7))
|
||||
* Gestion du refus définitif d'un dossier [N3WTS-2] ([2fef6d6](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/2fef6d61a4d38f82c28587a9642aef65b5fd387a))
|
||||
* lister uniquement les élèves inscrits dans une classe [N3WTS-6] ([6fb3c5c](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/6fb3c5cdb40f05b9c34b96334e785bc184751e4f))
|
||||
* Mise à jour de la page parent ([2d678b7](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/2d678b732f1be19b4653fbe68486455326da2157))
|
||||
* Page Inscriptions : suppression de la possibilité de créer un nouveau DI [N3WTS-8] ([195579e](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/195579e21710427d303e10c97b4a4438ec381da4))
|
||||
* Page Structure : suppression de la possibilité de faire des actions d'admin [N3WTS-8] ([05c68eb](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/05c68ebfaa0ff30a70ca9c42bcb306261c0fbb85))
|
||||
* Précablage du formulaire dynamique [N3WTS-17] ([dd00cba](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/dd00cba385a131ed7db66656738340234bcf5e73))
|
||||
* push test [#N3WTS-17] ([0fb668b](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/0fb668b21284a682a8dd5addd14e47c580723f13)), closes [#N3WTS-17](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/N3WTS-17)
|
||||
* Réorganisation items dans la page [N3WTS-17] ([8549699](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/8549699dec253a9763a4074e05130c4d7d40ac6e))
|
||||
* Sauvegarde des formulaires d'école dans les bons dossiers / ([b4f70e6](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/b4f70e6bad2fa31b6c1fd68d8538962b9d5e2650))
|
||||
* Securisation du Backend ([fa84309](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/fa843097ba9490c5083b652ec2dc9a9b28c096a0))
|
||||
* Securisation du téléchargement de fichier ([a329126](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/a3291262d80d2bddfc11412f55bc271ea6bf8219))
|
||||
* Traitement de clonages des templates de documents dans le back ([7486f6c](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/7486f6c5ce6c5aac2b051469903ef7b2936f5634)), closes [#N3WTS-17](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/N3WTS-17)
|
||||
* Validation document par document [N3WTS-2] ([8fd1b62](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/8fd1b62ec09a663f40262b406c2f17f64a8d5a2f))
|
||||
* WIP finalisation partie signature des parents [N3WTS-17] ([9dff32b](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/9dff32b388fd27a899a44e3424bb7d24b2b26afd))
|
||||
|
||||
|
||||
### Corrections de bugs
|
||||
|
||||
* Boutons de navigation + mise en page de l'aperçu du formulaire dynamique ([762dede](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/762dede0af37c41b2c1616216bd9f986d1e0c57f))
|
||||
* Changement des niveaux de logs [N3WTS-1] ([26d4b56](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/26d4b5633f7ebf5630105c3e9db802cdaeee4e37))
|
||||
* Chat getSession + passage en asyn ces getWebSocketUrl et connectToChat ([409cf05](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/409cf05f1a4554263d5f08185bce97d9425287fa))
|
||||
* coorection démarrage ([2579af9](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/2579af9b8b397d24e66ee08365e345f81bfb00cf))
|
||||
* Coquille [N3WTS-17] ([a034149](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/a034149eae7f3b746af32c392499217cf73ab582))
|
||||
* correction du téléchargement du fichier ([053140c](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/053140c8be1e10ac9b127cfb47b5691e70dd26e0))
|
||||
* Edition d'un teacher, champ email désactivé [N3WTS-1] ([176edc5](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/176edc5c452fa7b03da266f5a227c730ff4ad525))
|
||||
* Emploi du temps pour les classes de l'année scolaire en cours ([5bbbcb9](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/5bbbcb9dc1f688cd68f47f8f7629aa03678ba582))
|
||||
* Lint ([2dc0dfa](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/2dc0dfa26889b319f8c6cfb08b1701f8540d06ed))
|
||||
* messagerie ([a81b76e](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/a81b76eceac0919fc1873cdf8362e5fe55b97adb))
|
||||
* Mise à jour des plannings ([12939fc](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/12939fca85b139a2b0178b11a4a29ee5e97800ff))
|
||||
* Mise en page sur absence de frais ou de tarifs lors de la création d'un DI ([ccdbae1](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/ccdbae1c08e1d1edb3bc1e3e14e8244f196cac60))
|
||||
* Mise en place de l'auto reload pour Daphne [[#65](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/65)] ([7f002e2](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/7f002e2e6a93d651a8d9c2a03baa0f1035844f96))
|
||||
* Ne pas envoyer de mail lors de la création d'un DI ([3c72666](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/3c7266608d45cd1650775c9a2060dd1007280096))
|
||||
* On n'historise plus les matières ni les enseignants ([f9c0585](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/f9c0585b3061a6ae4a8978c9f0329c8710f9bd60))
|
||||
* Réintégration du bouton de Bilan de compétence + harmonisation des paths d'upload de fichier ([2a223fe](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/2a223fe3dd9dfae71117f0f47c07aee8a8893de5))
|
||||
* Revue des modales de création de groupes / formulaire ([1f2a1b8](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/1f2a1b88acab312dc90dcf4ba4d55048a3f302d9))
|
||||
* sélection enseignants dans les plannings ([4431c42](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/4431c428d3709ef3b2e8f66edd13beed73e42709))
|
||||
* signature électronique ([92c3183](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/92c318315335d126ccd6d8637c0381a3367b7a4f))
|
||||
* Suppression d'un PROFILE si aucun PROFILE_ROLE n'y est associé [N3WTS-1] ([92c6a31](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/92c6a31740b930fb5363b9dbf91b664f78c7f1a6))
|
||||
* Suppression envoi mail / création page feedback ([4c56cb6](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/4c56cb647470f86151b1ff78c318e0b6468f009d))
|
||||
* Upload document ([b0e04e3](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/b0e04e3adc480005b0d0d74bbc0ac28f1f9d6e4b))
|
||||
|
||||
### [0.0.4](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/compare/0.0.3...0.0.4) (2026-04-05)
|
||||
### [1.0.0](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/compare/0.0.3...1.0.0) (2026-04-05)
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "n3wt-school-front-end",
|
||||
"version": "0.0.5",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
85
JenkinsFile
85
JenkinsFile
@ -1,85 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
DOCKER_REGISTRY = 'git.v0id.ovh'
|
||||
ORGANIZATION = "n3wt-innov"
|
||||
APP_NAME = 'n3wt-school'
|
||||
}
|
||||
|
||||
// Déclencher uniquement sur les tags
|
||||
triggers {
|
||||
issueCommentTrigger('.*deploy.*')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Vérification du Tag') {
|
||||
when {
|
||||
expression { env.TAG_NAME != null }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
// Extraire la version du tag
|
||||
env.VERSION = env.TAG_NAME
|
||||
echo "Version détectée: ${env.VERSION}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Docker Images') {
|
||||
when {
|
||||
expression { env.TAG_NAME != null }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
// Donner les permissions d'exécution au script
|
||||
sh 'chmod +x ./ci-scripts/makeDocker.sh'
|
||||
|
||||
// Exécuter le script avec la version
|
||||
sh """
|
||||
./ci-scripts/makeDocker.sh ${env.VERSION}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Push sur Registry') {
|
||||
when {
|
||||
expression { env.TAG_NAME != null }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'docker-registry-credentials',
|
||||
usernameVariable: 'REGISTRY_USER',
|
||||
passwordVariable: 'REGISTRY_PASS'
|
||||
)]) {
|
||||
// Login au registry
|
||||
sh "docker login ${DOCKER_REGISTRY} -u ${REGISTRY_USER} -p ${REGISTRY_PASS}"
|
||||
|
||||
// Push des images
|
||||
sh """
|
||||
docker push ${DOCKER_REGISTRY}/${ORGANIZATION}/${APP_NAME}/frontend:${env.VERSION}
|
||||
docker push ${DOCKER_REGISTRY}/${ORGANIZATION}/${APP_NAME}/backend:${env.VERSION}
|
||||
docker push ${DOCKER_REGISTRY}/${ORGANIZATION}/${APP_NAME}/frontend:latest
|
||||
docker push ${DOCKER_REGISTRY}/${ORGANIZATION}/${APP_NAME}/backend:latest
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
echo "Build et push des images Docker réussis pour la version ${env.VERSION}"
|
||||
}
|
||||
failure {
|
||||
echo "Échec du build ou du push des images Docker"
|
||||
}
|
||||
always {
|
||||
// Nettoyage
|
||||
sh 'docker system prune -f'
|
||||
}
|
||||
}
|
||||
}
|
||||
27
README.md
27
README.md
@ -24,7 +24,7 @@ Maquette figma : https://www.figma.com/design/1BtWHIQlJDTeue2oYblefV/Maquette-Lo
|
||||
|
||||
Lien de téléchargement : https://www.docker.com/get-started/
|
||||
|
||||
# Lancement de monteschool
|
||||
# Lancement du projet
|
||||
|
||||
```sh
|
||||
docker compose up -d
|
||||
@ -36,7 +36,7 @@ Lancement du front end
|
||||
npm run dev
|
||||
```
|
||||
|
||||
se connecter à localhost:8080
|
||||
- se connecter à localhost:8080 pour le backend localhost:3000 pour le front
|
||||
|
||||
# Installation et développement en local
|
||||
|
||||
@ -57,25 +57,6 @@ npm i
|
||||
npm run format
|
||||
```
|
||||
|
||||
# Faire une livraison Mise en Production
|
||||
# Mise en Production, Préparation de la release
|
||||
|
||||
```sh
|
||||
# Faire la première release (1.0.0)
|
||||
npm run release -- --first-release
|
||||
|
||||
# Faire une prerelease (RC,alpha,beta)
|
||||
npm run release -- --prerelease <name>
|
||||
|
||||
|
||||
# Faire une release
|
||||
npm run release
|
||||
|
||||
# Forcer la release sur un mode particulier (majeur, mineur ou patch)
|
||||
# npm run script
|
||||
npm run release -- --release-as minor
|
||||
# Or
|
||||
npm run release -- --release-as 1.1.0
|
||||
|
||||
# ignorer les hooks de commit lors de la release
|
||||
npm run release -- --no-verify
|
||||
```
|
||||
- [MO_PREPARATION_MISE_EN_PROD](./docs/MEP/MO_PRE_MEP.md)
|
||||
|
||||
90
ci/build.Jenkinsfile
Normal file
90
ci/build.Jenkinsfile
Normal file
@ -0,0 +1,90 @@
|
||||
pipeline {
|
||||
|
||||
agent {
|
||||
label "SLAVE-N3WT"
|
||||
}
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
}
|
||||
|
||||
environment {
|
||||
DOCKER_REGISTRY = "git.v0id.ovh"
|
||||
ORG_NAME = "n3wt-innov"
|
||||
APP_NAME = "n3wt-school"
|
||||
|
||||
IMAGE_FRONT = "${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/frontend"
|
||||
IMAGE_BACK = "${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/backend"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage("Check Tag") {
|
||||
when {
|
||||
not {
|
||||
buildingTag()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
currentBuild.result = 'NOT_BUILT'
|
||||
error("⚠️ Pipeline uniquement déclenchée sur les tags. Aucun tag détecté.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage("Build Docker Images") {
|
||||
when {
|
||||
buildingTag()
|
||||
}
|
||||
steps {
|
||||
sh """
|
||||
chmod +x ./ci/scripts/makeDocker.sh
|
||||
./ci/scripts/makeDocker.sh ${TAG_NAME}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage("Push Images to Registry") {
|
||||
when {
|
||||
buildingTag()
|
||||
}
|
||||
steps {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: "gitea-jenkins",
|
||||
usernameVariable: "REGISTRY_USER",
|
||||
passwordVariable: "REGISTRY_PASS"
|
||||
)]) {
|
||||
|
||||
sh """
|
||||
echo "Login registry..."
|
||||
docker login ${DOCKER_REGISTRY} \
|
||||
-u ${REGISTRY_USER} \
|
||||
-p ${REGISTRY_PASS}
|
||||
|
||||
echo "Push version images..."
|
||||
docker push ${IMAGE_FRONT}:${TAG_NAME}
|
||||
docker push ${IMAGE_BACK}:${TAG_NAME}
|
||||
|
||||
echo "Tag latest..."
|
||||
docker tag ${IMAGE_FRONT}:${TAG_NAME} ${IMAGE_FRONT}:latest
|
||||
docker tag ${IMAGE_BACK}:${TAG_NAME} ${IMAGE_BACK}:latest
|
||||
|
||||
docker push ${IMAGE_FRONT}:latest
|
||||
docker push ${IMAGE_BACK}:latest
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
docker builder prune -f
|
||||
docker image prune -f
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
42
ci/deploy.Jenkinsfile
Normal file
42
ci/deploy.Jenkinsfile
Normal file
@ -0,0 +1,42 @@
|
||||
pipeline {
|
||||
agent { label "SLAVE-N3WT" }
|
||||
|
||||
parameters {
|
||||
choice(name: 'ENVIRONMENT', choices: ['demo', 'prod'], description: 'Choisir environnement')
|
||||
string(name: 'VERSION', defaultValue: 'v1.0.0', description: 'Version Docker à déployer')
|
||||
}
|
||||
|
||||
environment {
|
||||
PLATEFORME_DEMO = 'demo.n3wtschool.com'
|
||||
PLATEFORME_PROD = 'vps.n3wtschool.com'
|
||||
DEPLOY_DIR = '~/n3wtschool'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
script {
|
||||
def targetHost = params.ENVIRONMENT == 'prod' ? env.PLATEFORME_PROD : env.PLATEFORME_DEMO
|
||||
def deployDir = env.DEPLOY_DIR
|
||||
|
||||
// Le credential id Jenkins qui contient la clé SSH
|
||||
def sshCredentialId = params.ENVIRONMENT == 'prod' ? 'vps_n3wt_prod' : 'demo_n3wt'
|
||||
|
||||
// Le user SSH que tu passes dans la commande ssh
|
||||
def sshUser = params.ENVIRONMENT == 'prod' ? 'root' : 'demo'
|
||||
|
||||
sshagent([sshCredentialId]) {
|
||||
sh """
|
||||
ssh -o StrictHostKeyChecking=no ${sshUser}@${targetHost} <<EOF
|
||||
cd ${deployDir}
|
||||
docker compose down
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
EOF
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
|
||||
# Récupération de la version depuis les arguments
|
||||
VERSION=$1
|
||||
|
||||
@ -8,21 +11,22 @@ if [ -z "$VERSION" ]; then
|
||||
echo "Usage: ./makeDocker.sh <version>"
|
||||
exit 1
|
||||
fi
|
||||
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd $SCRIPT_PATH
|
||||
|
||||
# Configuration
|
||||
DOCKER_REGISTRY="git.v0id.ovh"
|
||||
ORG_NAME="n3wt-innov"
|
||||
APP_NAME="n3wt-school"
|
||||
|
||||
echo "Début de la construction des images Docker pour la version ${VERSION}"
|
||||
|
||||
# Construction de l'image Frontend
|
||||
echo "Construction de l'image Frontend..."
|
||||
cd ../Front-End
|
||||
cd $SCRIPT_PATH/../../Front-End
|
||||
|
||||
docker build \
|
||||
--build-arg BUILD_MODE=production \
|
||||
-t ${DOCKER_REGISTRY}/n3wt-innov/${APP_NAME}/frontend:${VERSION} \
|
||||
-t ${DOCKER_REGISTRY}/n3wt-innov/${APP_NAME}/frontend:latest \
|
||||
-t ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/frontend:${VERSION} \
|
||||
-t ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/frontend:latest \
|
||||
.
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -32,10 +36,10 @@ fi
|
||||
|
||||
# Construction de l'image Backend
|
||||
echo "Construction de l'image Backend..."
|
||||
cd ../Back-End
|
||||
cd $SCRIPT_PATH/../../Back-End
|
||||
docker build \
|
||||
-t ${DOCKER_REGISTRY}/n3wt-innov/${APP_NAME}/backend:${VERSION} \
|
||||
-t ${DOCKER_REGISTRY}/n3wt-innov/${APP_NAME}/backend:latest \
|
||||
-t ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/backend:${VERSION} \
|
||||
-t ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/backend:latest \
|
||||
.
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -45,9 +49,9 @@ fi
|
||||
|
||||
echo "Construction des images Docker terminée avec succès"
|
||||
echo "Images créées :"
|
||||
echo "- ${DOCKER_REGISTRY}/${APP_NAME}/frontend:${VERSION}"
|
||||
echo "- ${DOCKER_REGISTRY}/${APP_NAME}/frontend:latest"
|
||||
echo "- ${DOCKER_REGISTRY}/${APP_NAME}/backend:${VERSION}"
|
||||
echo "- ${DOCKER_REGISTRY}/${APP_NAME}/backend:latest"
|
||||
echo "- ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/frontend:${VERSION}"
|
||||
echo "- ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/frontend:latest"
|
||||
echo "- ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/backend:${VERSION}"
|
||||
echo "- ${DOCKER_REGISTRY}/${ORG_NAME}/${APP_NAME}/backend:latest"
|
||||
|
||||
exit 0
|
||||
38
docs/manuels/MEP/MO_PRE_MEP.md
Normal file
38
docs/manuels/MEP/MO_PRE_MEP.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Préparation de la RELEASE et du CHANGELOG
|
||||
|
||||
- Vérifier que l'ensemble des tickets sont mergé dans develop
|
||||
- Fusionner develop dans main via une [nouvelle demande d'ajout](https://git.v0id.ovh/n3wt-innov/n3wt-school/compare/main...develop)
|
||||
- Faire une release avec la commande `npm run release` sur la branch main
|
||||
\*\* NB: si vous souhaité avoir une release particulier (cf. Utilisation de standart-version)
|
||||
- Pousser le commit de changement de version/Changelog et le tag sur main
|
||||
- Depuis jenkins lancer le build sur le nouveau tag créé : https://jenkins.v0id.ovh/job/N3WT/job/Newt-Innov/job/n3wt-school/view/tags/
|
||||
|
||||
# Faire une Mise en Production
|
||||
|
||||
- Depuis jenkins deployer la nouvelle version tagué.
|
||||
|
||||
# Utilisation de standart-version
|
||||
|
||||
L'utilisation de la norme conventionnal commit permet la génération automatique d'un CHANGELOG
|
||||
via l'outil [standard-version](https://github.com/conventional-changelog/standard-version)
|
||||
|
||||
```sh
|
||||
# Faire la première release (1.0.0)
|
||||
npm run release -- --first-release
|
||||
|
||||
# Faire une prerelease (RC,alpha,beta)
|
||||
npm run release -- --prerelease <name>
|
||||
|
||||
|
||||
# Faire une release
|
||||
npm run release
|
||||
|
||||
# Forcer la release sur un mode particulier (majeur, mineur ou patch)
|
||||
# npm run script
|
||||
npm run release -- --release-as minor
|
||||
# Or
|
||||
npm run release -- --release-as 1.1.0
|
||||
|
||||
# ignorer les hooks de commit lors de la release
|
||||
npm run release -- --no-verify
|
||||
```
|
||||
Reference in New Issue
Block a user