devzone 0.42.0 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/agent.sh +1 -1
- package/.devcontainer/argocd/apps.sh +2 -2
- package/.devcontainer/argocd/argocd.sh +22 -10
- package/.devcontainer/catalogue/app.sh +22 -4
- package/.devcontainer/catalogue/catalogue-veilleur.sh +2 -2
- package/.devcontainer/catalogue/mysql/mysql.sh +41 -28
- package/.devcontainer/catalogue/mysql/volume.sh +5 -5
- package/.devcontainer/catalogue.sh +29 -35
- package/.devcontainer/cluster.sh +11 -11
- package/.devcontainer/clusters.sh +1 -1
- package/.devcontainer/command-aliases.sh +152 -2
- package/.devcontainer/demarrage.sh +18 -15
- package/.devcontainer/devcontainer.json +1 -1
- package/.devcontainer/devzone +106 -118
- package/.devcontainer/docker-relais.sh +2 -2
- package/.devcontainer/docker-sans-hote.sh +1 -1
- package/.devcontainer/etat-json.sh +16 -16
- package/.devcontainer/etat.sh +4 -4
- package/.devcontainer/gitlab/gitlab.sh +24 -12
- package/.devcontainer/gitlab/installation.sh +9 -9
- package/.devcontainer/gitlab/secrets.sh +2 -2
- package/.devcontainer/gitlab/test-gitlab-restes.sh +16 -0
- package/.devcontainer/gitlab/test-gitlab.sh +14 -13
- package/.devcontainer/help.sh +40 -0
- package/.devcontainer/kube-compte.sh +2 -2
- package/.devcontainer/kube-config.sh +1 -1
- package/.devcontainer/kube-joignable.sh +2 -0
- package/.devcontainer/opencode.jsonc +1 -1
- package/.devcontainer/paquets.sh +31 -18
- package/.devcontainer/ports-auto.sh +6 -6
- package/.devcontainer/ports-json.sh +34 -0
- package/.devcontainer/ports.sh +34 -43
- package/.devcontainer/post-create.sh +3 -3
- package/.devcontainer/postgres/postgres.sh +42 -30
- package/.devcontainer/services-admin.sh +1 -1
- package/.devcontainer/skills/devzone/SKILL.md +16 -16
- package/README.md +17 -17
- package/manage/scripts/docker-workstation.sh +73 -0
- package/manage/scripts/lancer.sh +1 -1
- package/manage/scripts/migrer-retour.sh +1 -0
- package/manage/scripts/migrer.sh +6 -0
- package/manage/scripts/services-workspace.sh +1 -2
- package/package.json +1 -1
package/.devcontainer/devzone
CHANGED
|
@@ -1,35 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# devzone état des modules
|
|
4
|
-
# devzone plateforme GitHub (défaut) ou GitLab
|
|
5
|
-
# devzone plateforme github retour à GitHub : glab et config retirés
|
|
6
|
-
# devzone plateforme gitlab GitLab, [--url URL] (défaut : module gitlab)
|
|
7
|
-
# devzone activer <module> active et applique tout de suite
|
|
8
|
-
# devzone desactiver <module> désactive et applique tout de suite
|
|
9
|
-
# devzone appliquer installe ce qui est actif (post-create.sh)
|
|
10
|
-
# devzone reparer répare relais Docker, gitlab, postgres, ports, identifiants
|
|
11
|
-
# devzone demarrer démarrage complet (scripts de démarrage et récapitulatif)
|
|
12
|
-
# devzone metrics [contexte…] installe metrics-server (kubectl top, k9s)
|
|
13
|
-
# devzone utiliser CTX [--confirmer CTX] bascule le cluster de travail de kubectl
|
|
14
|
-
# devzone clusters vue des clusters connectés (travail et services)
|
|
15
|
-
# devzone actif <module> code 0 si actif (scripts de démarrage)
|
|
16
|
-
# devzone test-bash32 lance les tests bats sous bash 3.2 (conteneur Docker)
|
|
17
|
-
# devzone test-gitlab essai de bout en bout du module et de la plateforme GitLab
|
|
18
|
-
# devzone agent <dossier> <fichier-consigne> dirige opencode sur une consigne
|
|
19
|
-
# devzone ticket <n> [--repo devzone|repowarden] worktree du ticket (ticket done <n> le retire)
|
|
20
|
-
# devzone build <dossier> [--tag <nom>] construit une image dans le workspace Kubernetes (BuildKit)
|
|
21
|
-
# devzone activer postgres [--contexte CTX] [--confirmer CTX] PostgreSQL partagé, cluster au choix
|
|
22
|
-
# devzone postgres creer <projet> base et utilisateur d'un projet (aussi : liste, psql, supprimer)
|
|
23
|
-
# devzone mysql creer <projet> base et utilisateur d'un projet MySQL (aussi : liste, supprimer)
|
|
24
|
-
# devzone gitlab migrer [--oui] GitLab dans le cluster des services, puis ancien cluster kind supprimé
|
|
25
|
-
# devzone gitlab nouveau-mdp [root|dev] mot de passe aléatoire (root ou dev) régénéré
|
|
26
|
-
# devzone activer argocd Argo CD dans le cluster des services, accès https://127.0.0.1:8443
|
|
27
|
-
# devzone argocd etat|relais-lancer|relais-arreter Argo CD (module argocd)
|
|
28
|
-
# devzone argocd app add <repo url> [path]|list|remove <N> projets déployés par Argo CD (#516)
|
|
29
|
-
# devzone cluster [CTX] [--oui] [--confirmer CTX] cluster des services de devzone, ou en changer
|
|
30
|
-
# devzone port [<n>|--fermer <n>] relais d'un port du conteneur vers le poste
|
|
31
|
-
# devzone mots-de-passe régénère .password et affiche son chemin
|
|
32
|
-
# devzone paquets [ajouter|retirer|appliquer] … paquets système gardés après un rebuild
|
|
2
|
+
# Aide de devzone (devzone --help) : .devcontainer/help.sh, sourcé ci-dessous.
|
|
33
3
|
#
|
|
34
4
|
# État propre à chaque instance : $RACINE/.devzone.modules (dossier monté
|
|
35
5
|
# de l'hôte, survit aux rebuilds), une ligne « module=on|off » ; la plateforme
|
|
@@ -50,6 +20,9 @@ while [ -L "$SOURCE" ]; do
|
|
|
50
20
|
esac
|
|
51
21
|
done
|
|
52
22
|
ICI="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
23
|
+
# shellcheck source=SCRIPTDIR/help.sh
|
|
24
|
+
# shellcheck disable=SC1091
|
|
25
|
+
. "$ICI/help.sh"
|
|
53
26
|
VERSIONS="$ICI/../manage/scripts/versions.sh"
|
|
54
27
|
# Dossier de devzone (/workspaces/devzone) ; DEVZONE_RACINE pour les tests
|
|
55
28
|
RACINE="${DEVZONE_RACINE:-$(dirname "$ICI")}"
|
|
@@ -74,7 +47,7 @@ if [ -f "$ICI/argocd/conf.sh" ]; then
|
|
|
74
47
|
. "$ICI/argocd/conf.sh"
|
|
75
48
|
fi
|
|
76
49
|
|
|
77
|
-
# Assistants IA, versions figées : mettre à jour ici, puis devzone
|
|
50
|
+
# Assistants IA, versions figées : mettre à jour ici, puis devzone apply
|
|
78
51
|
# (ou Rebuild Container). Une ligne par paquet, séparées par une ligne qui ne
|
|
79
52
|
# change pas : deux montées simultanées (workflow versions) se fusionnent sans
|
|
80
53
|
# conflit, git n'en signalant qu'entre lignes voisines modifiées.
|
|
@@ -218,7 +191,7 @@ retirer_config_opencode() {
|
|
|
218
191
|
|
|
219
192
|
# Repère de la skill devzone : posée si absente, mise à jour si elle porte le
|
|
220
193
|
# repère et n'a pas été modifiée, gardée si personnalisée (#161, règle opencode).
|
|
221
|
-
SKILL_REPERE='<!-- devzone : skill posée par devzone
|
|
194
|
+
SKILL_REPERE='<!-- devzone : skill posée par devzone enable ia -->'
|
|
222
195
|
# Empreinte de la version posée, à côté de SKILL.md : elle distingue une skill
|
|
223
196
|
# non modifiée d'une skill personnalisée qui garde encore le repère.
|
|
224
197
|
SKILL_EMPREINTE='.devzone-empreinte'
|
|
@@ -425,7 +398,7 @@ appliquer_ia() {
|
|
|
425
398
|
if ! installer_ia; then
|
|
426
399
|
journal="$(dernier_journal_npm)"
|
|
427
400
|
echo "journal npm : $journal" >"$(fichier_echec ia)"
|
|
428
|
-
echo "devzone : échec de l'installation de ${IA_FAILED[*]} (npm install -g, 3 essais) ; journal npm : $journal ; réessayer : devzone
|
|
401
|
+
echo "devzone : échec de l'installation de ${IA_FAILED[*]} (npm install -g, 3 essais) ; journal npm : $journal ; réessayer : devzone apply" >&2
|
|
429
402
|
return 1
|
|
430
403
|
fi
|
|
431
404
|
rm -f "$(fichier_echec ia)"
|
|
@@ -504,7 +477,7 @@ appliquer_gitlab() {
|
|
|
504
477
|
local etat_courant
|
|
505
478
|
if [ "$1" = on ]; then
|
|
506
479
|
# Saut si l'état est prêt et le runner en ligne ; sinon installer reprend
|
|
507
|
-
etat_courant="$(bash "$ICI/gitlab/gitlab.sh"
|
|
480
|
+
etat_courant="$(bash "$ICI/gitlab/gitlab.sh" status)"
|
|
508
481
|
if [[ "$etat_courant" == *"prêt"* && "$etat_courant" == *"runner en ligne"* ]]; then
|
|
509
482
|
echo "devzone : gitlab déjà actif, rien à faire."
|
|
510
483
|
# /etc/hosts régénéré par Docker : gitlab.localhost re-pose ici aussi
|
|
@@ -513,7 +486,7 @@ appliquer_gitlab() {
|
|
|
513
486
|
rm -f "$(fichier_echec gitlab)"
|
|
514
487
|
else
|
|
515
488
|
echo "devzone : gitlab activation via installer…"
|
|
516
|
-
if ! bash "$ICI/gitlab/gitlab.sh"
|
|
489
|
+
if ! bash "$ICI/gitlab/gitlab.sh" install; then
|
|
517
490
|
echo "gitlab" > "$(fichier_echec gitlab)"
|
|
518
491
|
return 1
|
|
519
492
|
fi
|
|
@@ -524,9 +497,9 @@ appliquer_gitlab() {
|
|
|
524
497
|
if bash "$ICI/gitlab/gitlab.sh" installe; then
|
|
525
498
|
echo "devzone : gitlab désactivation…"
|
|
526
499
|
if [ -n "${SUPPRIMER_DONNEES:-}" ]; then
|
|
527
|
-
bash "$ICI/gitlab/gitlab.sh"
|
|
500
|
+
bash "$ICI/gitlab/gitlab.sh" uninstall --yes
|
|
528
501
|
else
|
|
529
|
-
bash "$ICI/gitlab/gitlab.sh"
|
|
502
|
+
bash "$ICI/gitlab/gitlab.sh" uninstall
|
|
530
503
|
fi
|
|
531
504
|
else
|
|
532
505
|
echo "devzone : gitlab déjà désactivé (aucun namespace devzone-gitlab)."
|
|
@@ -535,7 +508,7 @@ appliquer_gitlab() {
|
|
|
535
508
|
}
|
|
536
509
|
|
|
537
510
|
# PostgreSQL partagé (#280) : installé sur le cluster de devzone, choisi à la
|
|
538
|
-
# première activation (--
|
|
511
|
+
# première activation (--context, menu en terminal, kind dédié sinon)
|
|
539
512
|
appliquer_postgres() {
|
|
540
513
|
local voulu="" confirmer="" attendre="" arg ctx actuel etat_courant
|
|
541
514
|
if [ "$1" = on ]; then
|
|
@@ -549,9 +522,9 @@ appliquer_postgres() {
|
|
|
549
522
|
continue
|
|
550
523
|
fi
|
|
551
524
|
case "$arg" in
|
|
552
|
-
--
|
|
553
|
-
--
|
|
554
|
-
*) echo "devzone : argument inconnu : $arg (devzone
|
|
525
|
+
--context) attendre=contexte ;;
|
|
526
|
+
--confirm) attendre=confirmer ;;
|
|
527
|
+
*) echo "devzone : argument inconnu : $arg (devzone enable postgres --context CTX [--confirm CTX])" >&2; ecrire postgres off; return 2 ;;
|
|
555
528
|
esac
|
|
556
529
|
done
|
|
557
530
|
if [ -n "$attendre" ]; then
|
|
@@ -566,49 +539,49 @@ appliquer_postgres() {
|
|
|
566
539
|
return 2
|
|
567
540
|
fi
|
|
568
541
|
if [ -n "$confirmer" ]; then
|
|
569
|
-
ctx="$(cluster_choisir "$voulu" --
|
|
542
|
+
ctx="$(cluster_choisir "$voulu" --confirm "$confirmer")" || { ecrire postgres off; return 2; }
|
|
570
543
|
else
|
|
571
544
|
ctx="$(cluster_choisir "$voulu")" || { ecrire postgres off; return 2; }
|
|
572
545
|
fi
|
|
573
546
|
# Choix gardé avant l'installation : une reprise vise le même cluster
|
|
574
547
|
cluster_ecrire "$ctx"
|
|
575
|
-
etat_courant="$(bash "$ICI/postgres/postgres.sh"
|
|
548
|
+
etat_courant="$(bash "$ICI/postgres/postgres.sh" status)"
|
|
576
549
|
# « relais arrêté » d'abord : cette ligne commence aussi par « prêt sur »
|
|
577
550
|
if [[ "$etat_courant" == *"relais arrêté"* ]]; then
|
|
578
|
-
bash "$ICI/postgres/postgres.sh"
|
|
551
|
+
bash "$ICI/postgres/postgres.sh" relay-start
|
|
579
552
|
echo "devzone : postgres : relais relancé"
|
|
580
553
|
elif [[ "$etat_courant" == "prêt sur"* ]]; then
|
|
581
554
|
echo "devzone : postgres déjà actif, rien à faire."
|
|
582
|
-
elif ! bash "$ICI/postgres/postgres.sh"
|
|
555
|
+
elif ! bash "$ICI/postgres/postgres.sh" install; then
|
|
583
556
|
echo "postgres" >"$(fichier_echec postgres)"
|
|
584
557
|
return 1
|
|
585
558
|
fi
|
|
586
559
|
rm -f "$(fichier_echec postgres)"
|
|
587
560
|
else
|
|
588
|
-
bash "$ICI/postgres/postgres.sh"
|
|
561
|
+
bash "$ICI/postgres/postgres.sh" uninstall
|
|
589
562
|
rm -f "$(fichier_echec postgres)"
|
|
590
563
|
fi
|
|
591
564
|
}
|
|
592
565
|
|
|
593
566
|
# Argo CD (#411) : installé dans le cluster des services, accès par le relais
|
|
594
|
-
# 127.0.0.1:8443 ; un échec est marqué dans l'état et repris par devzone
|
|
567
|
+
# 127.0.0.1:8443 ; un échec est marqué dans l'état et repris par devzone apply
|
|
595
568
|
appliquer_argocd() {
|
|
596
569
|
local etat_courant
|
|
597
570
|
if [ "$1" = on ]; then
|
|
598
|
-
etat_courant="$(bash "$ICI/argocd/argocd.sh"
|
|
571
|
+
etat_courant="$(bash "$ICI/argocd/argocd.sh" status)"
|
|
599
572
|
# « relais arrêté » d'abord : cette ligne commence aussi par « prêt »
|
|
600
573
|
if [[ "$etat_courant" == *"relais arrêté"* ]]; then
|
|
601
|
-
bash "$ICI/argocd/argocd.sh"
|
|
574
|
+
bash "$ICI/argocd/argocd.sh" relay-start
|
|
602
575
|
echo "devzone : argocd : relais relancé"
|
|
603
576
|
elif [[ "$etat_courant" == "prêt"* ]]; then
|
|
604
577
|
echo "devzone : argocd déjà actif, rien à faire."
|
|
605
|
-
elif ! bash "$ICI/argocd/argocd.sh"
|
|
578
|
+
elif ! bash "$ICI/argocd/argocd.sh" install; then
|
|
606
579
|
echo "argocd" >"$(fichier_echec argocd)"
|
|
607
580
|
return 1
|
|
608
581
|
fi
|
|
609
582
|
rm -f "$(fichier_echec argocd)"
|
|
610
583
|
else
|
|
611
|
-
bash "$ICI/argocd/argocd.sh"
|
|
584
|
+
bash "$ICI/argocd/argocd.sh" uninstall
|
|
612
585
|
rm -f "$(fichier_echec argocd)"
|
|
613
586
|
fi
|
|
614
587
|
}
|
|
@@ -620,19 +593,19 @@ appliquer_mysql() {
|
|
|
620
593
|
if [ "$1" = on ]; then
|
|
621
594
|
ctx="$(cluster_lu)"
|
|
622
595
|
if [ -z "$ctx" ]; then
|
|
623
|
-
echo "devzone : mysql : aucun cluster choisi : devzone
|
|
596
|
+
echo "devzone : mysql : aucun cluster choisi : devzone enable mysql" >&2
|
|
624
597
|
ecrire mysql off
|
|
625
598
|
echo mysql >"$(fichier_echec mysql)"
|
|
626
599
|
return 2
|
|
627
600
|
fi
|
|
628
|
-
etat_courant="$(bash "$ICI/catalogue/mysql/mysql.sh"
|
|
601
|
+
etat_courant="$(bash "$ICI/catalogue/mysql/mysql.sh" status)"
|
|
629
602
|
# « relais arrêté » d'abord : cette ligne commence aussi par « prêt sur »
|
|
630
603
|
if [[ "$etat_courant" == *"relais arrêté"* ]]; then
|
|
631
|
-
bash "$ICI/catalogue/mysql/mysql.sh"
|
|
604
|
+
bash "$ICI/catalogue/mysql/mysql.sh" relay-start
|
|
632
605
|
echo "devzone : mysql : relais relancé"
|
|
633
606
|
elif [[ "$etat_courant" == "prêt sur"* ]]; then
|
|
634
607
|
echo "devzone : mysql déjà actif, rien à faire."
|
|
635
|
-
elif ! bash "$ICI/catalogue/mysql/mysql.sh"
|
|
608
|
+
elif ! bash "$ICI/catalogue/mysql/mysql.sh" install; then
|
|
636
609
|
echo mysql >"$(fichier_echec mysql)"
|
|
637
610
|
return 1
|
|
638
611
|
fi
|
|
@@ -640,23 +613,24 @@ appliquer_mysql() {
|
|
|
640
613
|
else
|
|
641
614
|
# Retrait sans suppression des données : volume gardé (#441) ; les
|
|
642
615
|
# bases ne partent qu'avec un oui (confirmer_suppression)
|
|
643
|
-
bash "$ICI/catalogue.sh"
|
|
616
|
+
bash "$ICI/catalogue.sh" remove mysql
|
|
644
617
|
if [ -n "${SUPPRIMER_DONNEES:-}" ]; then
|
|
645
|
-
bash "$ICI/catalogue/mysql/mysql.sh"
|
|
618
|
+
bash "$ICI/catalogue/mysql/mysql.sh" delete-data --yes
|
|
646
619
|
fi
|
|
647
620
|
rm -f "$(fichier_echec mysql)"
|
|
648
621
|
fi
|
|
649
622
|
}
|
|
650
623
|
|
|
651
624
|
# Toutes les bases disparaissent : confirmation en terminal (sans terminal, la
|
|
652
|
-
# commande est explicite) ; un oui ou --
|
|
653
|
-
# appliquer_mysql pour lancer supprimer-donnees (#441)
|
|
625
|
+
# commande est explicite) ; un oui ou --yes marque SUPPRIMER_DONNEES, lu par
|
|
626
|
+
# appliquer_mysql pour lancer supprimer-donnees (#441). Les arguments passent
|
|
627
|
+
# par canonical_args : --oui arrive ici déjà traduit en --yes (#557).
|
|
654
628
|
confirmer_suppression() {
|
|
655
629
|
local app="$1" reponse arg
|
|
656
630
|
SUPPRIMER_DONNEES=""
|
|
657
631
|
[ "$(valeur "$app")" = on ] || return 0
|
|
658
632
|
for arg in "${@:2}"; do
|
|
659
|
-
case "$arg" in --
|
|
633
|
+
case "$arg" in --yes) SUPPRIMER_DONNEES=1 ;; esac
|
|
660
634
|
done
|
|
661
635
|
[ -z "$SUPPRIMER_DONNEES" ] || return 0
|
|
662
636
|
cluster_interactif || return 0
|
|
@@ -681,7 +655,7 @@ confirmer_suppression() {
|
|
|
681
655
|
esac
|
|
682
656
|
}
|
|
683
657
|
|
|
684
|
-
# devzone cluster [CTX] [--
|
|
658
|
+
# devzone cluster [CTX] [--yes] : affiche le cluster des services, ou les y
|
|
685
659
|
# déplace (désinstallés de l'ancien, installés sur le nouveau : données non
|
|
686
660
|
# migrées, d'où la confirmation)
|
|
687
661
|
changer_cluster() {
|
|
@@ -694,20 +668,20 @@ changer_cluster() {
|
|
|
694
668
|
continue
|
|
695
669
|
fi
|
|
696
670
|
case "$arg" in
|
|
697
|
-
--
|
|
698
|
-
--
|
|
699
|
-
-*) echo "devzone : argument inconnu : $arg (devzone cluster [CTX] [--
|
|
671
|
+
--yes) oui=1 ;;
|
|
672
|
+
--confirm) attendre=1 ;;
|
|
673
|
+
-*) echo "devzone : argument inconnu : $arg (devzone cluster [CTX] [--yes] [--confirm CTX])" >&2; return 2 ;;
|
|
700
674
|
*) voulu="$arg" ;;
|
|
701
675
|
esac
|
|
702
676
|
done
|
|
703
677
|
if [ -n "$attendre" ]; then
|
|
704
|
-
echo "devzone : --
|
|
678
|
+
echo "devzone : --confirm attend un contexte" >&2
|
|
705
679
|
return 2
|
|
706
680
|
fi
|
|
707
681
|
actuel="$(cluster_lu)"
|
|
708
682
|
if [ -z "$voulu" ]; then
|
|
709
683
|
if [ -z "$actuel" ]; then
|
|
710
|
-
echo "devzone : aucun cluster choisi (fixé à l'activation d'un module : devzone
|
|
684
|
+
echo "devzone : aucun cluster choisi (fixé à l'activation d'un module : devzone enable postgres)"
|
|
711
685
|
elif cluster_est_dedie "$actuel"; then
|
|
712
686
|
echo "devzone : cluster $actuel (kind dédié, dans le conteneur)"
|
|
713
687
|
else
|
|
@@ -717,7 +691,7 @@ changer_cluster() {
|
|
|
717
691
|
return 0
|
|
718
692
|
fi
|
|
719
693
|
if [ -n "$confirmer" ]; then
|
|
720
|
-
nouveau="$(cluster_choisir "$voulu" --
|
|
694
|
+
nouveau="$(cluster_choisir "$voulu" --confirm "$confirmer")" || return 2
|
|
721
695
|
else
|
|
722
696
|
nouveau="$(cluster_choisir "$voulu")" || return 2
|
|
723
697
|
fi
|
|
@@ -730,7 +704,7 @@ changer_cluster() {
|
|
|
730
704
|
if [ "$(valeur postgres)" = on ]; then
|
|
731
705
|
if [ -z "$oui" ]; then
|
|
732
706
|
if ! cluster_interactif; then
|
|
733
|
-
echo "devzone : les bases postgres seront supprimées de $ctx_ancien (non migrées) : devzone cluster $ctx_new --
|
|
707
|
+
echo "devzone : les bases postgres seront supprimées de $ctx_ancien (non migrées) : devzone cluster $ctx_new --yes" >&2
|
|
734
708
|
return 1
|
|
735
709
|
fi
|
|
736
710
|
printf 'postgres sera réinstallé sur %s, ses bases supprimées de %s (non migrées). Continuer ? [o/N] ' "$ctx_new" "$ctx_ancien" >&2
|
|
@@ -755,7 +729,7 @@ changer_cluster() {
|
|
|
755
729
|
return 1
|
|
756
730
|
fi
|
|
757
731
|
# Installe PostgreSQL sur le nouveau cluster (via --context devzone qui pointe maintenant dessus)
|
|
758
|
-
bash "$ICI/postgres/postgres.sh"
|
|
732
|
+
bash "$ICI/postgres/postgres.sh" install
|
|
759
733
|
else
|
|
760
734
|
cluster_ecrire "$ctx_new"
|
|
761
735
|
# Pose le contexte devzone sur le nouveau cluster (cluster + user :
|
|
@@ -813,7 +787,7 @@ ligne_plateforme() {
|
|
|
813
787
|
fi
|
|
814
788
|
}
|
|
815
789
|
|
|
816
|
-
# Affichage simple de la plateforme (devzone
|
|
790
|
+
# Affichage simple de la plateforme (devzone platform)
|
|
817
791
|
resume_plateforme() {
|
|
818
792
|
local url hote
|
|
819
793
|
if [ "$(plateforme_lue)" = gitlab ]; then
|
|
@@ -844,7 +818,7 @@ installer_glab() {
|
|
|
844
818
|
archive="$(mktemp)"
|
|
845
819
|
if ! curl -fsSL -o "$archive" "https://gitlab.com/gitlab-org/cli/-/releases/$GLAB_VERSION/downloads/glab_${GLAB_VERSION#v}_linux_${arch}.tar.gz"; then
|
|
846
820
|
rm -f "$archive"
|
|
847
|
-
echo "devzone : téléchargement de glab impossible (release officielle de gitlab.com) ; réessayer : devzone
|
|
821
|
+
echo "devzone : téléchargement de glab impossible (release officielle de gitlab.com) ; réessayer : devzone platform gitlab --url URL" >&2
|
|
848
822
|
return 1
|
|
849
823
|
fi
|
|
850
824
|
if [ "$(sha256sum "$archive" | cut -d' ' -f1)" != "$somme" ]; then
|
|
@@ -876,12 +850,12 @@ connexion_glab() {
|
|
|
876
850
|
local hote="$1" url="$2" jeton
|
|
877
851
|
if [ "$url" = "$GITLAB_URL_MODULE" ]; then
|
|
878
852
|
if [ ! -f "$RACINE/workspace/.gitlab/root-token" ]; then
|
|
879
|
-
echo "devzone : jeton root du module gitlab introuvable ($RACINE/workspace/.gitlab/root-token) : devzone
|
|
853
|
+
echo "devzone : jeton root du module gitlab introuvable ($RACINE/workspace/.gitlab/root-token) : devzone enable gitlab, ou à la main : glab auth login --hostname $hote" >&2
|
|
880
854
|
return 1
|
|
881
855
|
fi
|
|
882
856
|
jeton="$(cat "$RACINE/workspace/.gitlab/root-token")"
|
|
883
857
|
if ! "$GLAB" auth login --hostname "$hote" --api-protocol http --git-protocol http --token "$jeton"; then
|
|
884
|
-
echo "devzone : connexion à l'instance gitlab impossible : devzone
|
|
858
|
+
echo "devzone : connexion à l'instance gitlab impossible : devzone enable gitlab, ou à la main : glab auth login --hostname $hote" >&2
|
|
885
859
|
return 1
|
|
886
860
|
fi
|
|
887
861
|
elif ! "$GLAB" auth login --hostname "$hote"; then
|
|
@@ -913,7 +887,7 @@ changer_plateforme() {
|
|
|
913
887
|
if [ -n "$attendre" ]; then url="$arg"; attendre=""; continue; fi
|
|
914
888
|
case "$arg" in
|
|
915
889
|
--url) attendre=1 ;;
|
|
916
|
-
*) echo "devzone : argument inconnu : $arg (devzone
|
|
890
|
+
*) echo "devzone : argument inconnu : $arg (devzone platform gitlab --url URL)" >&2; return 1 ;;
|
|
917
891
|
esac
|
|
918
892
|
done
|
|
919
893
|
if [ -n "$attendre" ]; then
|
|
@@ -924,7 +898,7 @@ changer_plateforme() {
|
|
|
924
898
|
if [ "$(valeur gitlab)" = on ]; then
|
|
925
899
|
url="$GITLAB_URL_MODULE"
|
|
926
900
|
else
|
|
927
|
-
echo "devzone : URL manquante : devzone
|
|
901
|
+
echo "devzone : URL manquante : devzone platform gitlab --url URL (ou un module gitlab actif pour l'instance locale)" >&2
|
|
928
902
|
return 1
|
|
929
903
|
fi
|
|
930
904
|
fi
|
|
@@ -1061,7 +1035,7 @@ ligne_version_disponible() {
|
|
|
1061
1035
|
publiee="${publiee#v}"
|
|
1062
1036
|
[ -n "$publiee" ] || return 0
|
|
1063
1037
|
if version_plus_recente "$publiee" "$dossier"; then
|
|
1064
|
-
printf ' ○ devzone %s
|
|
1038
|
+
printf ' ○ devzone %s available: on the workstation, devzone update\n' "$publiee"
|
|
1065
1039
|
fi
|
|
1066
1040
|
}
|
|
1067
1041
|
|
|
@@ -1093,19 +1067,22 @@ reparer() {
|
|
|
1093
1067
|
fi
|
|
1094
1068
|
if [ "$(valeur gitlab)" = on ]; then
|
|
1095
1069
|
reparer_element "nom gitlab" bash "$ICI/gitlab/gitlab.sh" hote-poser
|
|
1096
|
-
reparer_element "relais gitlab" bash "$ICI/gitlab/gitlab.sh"
|
|
1070
|
+
reparer_element "relais gitlab" bash "$ICI/gitlab/gitlab.sh" relay-start
|
|
1097
1071
|
fi
|
|
1098
1072
|
if [ "$(valeur postgres)" = on ]; then
|
|
1099
|
-
reparer_element "relais postgres" bash "$ICI/postgres/postgres.sh"
|
|
1073
|
+
reparer_element "relais postgres" bash "$ICI/postgres/postgres.sh" relay-start
|
|
1100
1074
|
fi
|
|
1101
1075
|
if [ "$(valeur argocd)" = on ]; then
|
|
1102
|
-
reparer_element "relais argocd" bash "$ICI/argocd/argocd.sh"
|
|
1076
|
+
reparer_element "relais argocd" bash "$ICI/argocd/argocd.sh" relay-start
|
|
1103
1077
|
fi
|
|
1104
1078
|
if [ "$(valeur mysql)" = on ]; then
|
|
1105
|
-
reparer_element "relais mysql" bash "$ICI/catalogue/mysql/mysql.sh"
|
|
1079
|
+
reparer_element "relais mysql" bash "$ICI/catalogue/mysql/mysql.sh" relay-start
|
|
1080
|
+
fi
|
|
1081
|
+
reparer_element "relais de ports" bash "$ICI/ports.sh" restart
|
|
1082
|
+
# Kubernetes workspace (#517): no automatic port watcher
|
|
1083
|
+
if ! dans_pod; then
|
|
1084
|
+
reparer_element "veilleur ports auto" env DEVZONE_PORTS_AUTO_REEL=oui bash "$ICI/ports-auto.sh" demarrer
|
|
1106
1085
|
fi
|
|
1107
|
-
reparer_element "relais de ports" bash "$ICI/ports.sh" relancer
|
|
1108
|
-
reparer_element "veilleur ports auto" env DEVZONE_PORTS_AUTO_REEL=oui bash "$ICI/ports-auto.sh" demarrer
|
|
1109
1086
|
reparer_element "veilleur catalogue" env DEVZONE_CATALOGUE_REEL=oui bash "$ICI/catalogue/catalogue-veilleur.sh" demarrer
|
|
1110
1087
|
reparer_element "identifiants" bash "$ICI/password.sh" regenerer
|
|
1111
1088
|
return "$reparer_echec"
|
|
@@ -1129,22 +1106,22 @@ utiliser() {
|
|
|
1129
1106
|
shift
|
|
1130
1107
|
;;
|
|
1131
1108
|
--namespace=*) namespace="${arg#*=}" ;;
|
|
1132
|
-
--
|
|
1109
|
+
--confirm)
|
|
1133
1110
|
if [ "$#" -eq 0 ]; then
|
|
1134
|
-
echo "devzone : --
|
|
1111
|
+
echo "devzone : --confirm attend un contexte" >&2
|
|
1135
1112
|
return 2
|
|
1136
1113
|
fi
|
|
1137
1114
|
confirmer="$1"
|
|
1138
1115
|
shift
|
|
1139
1116
|
;;
|
|
1140
|
-
--
|
|
1117
|
+
--confirm=*) confirmer="${arg#*=}" ;;
|
|
1141
1118
|
-*)
|
|
1142
|
-
echo "devzone : argument inconnu : $arg (devzone
|
|
1119
|
+
echo "devzone : argument inconnu : $arg (devzone use CTX [-n NS] [--confirm CTX])" >&2
|
|
1143
1120
|
return 2
|
|
1144
1121
|
;;
|
|
1145
1122
|
*)
|
|
1146
1123
|
if [ -n "$ctx" ]; then
|
|
1147
|
-
echo "devzone : argument inconnu : $arg (devzone
|
|
1124
|
+
echo "devzone : argument inconnu : $arg (devzone use CTX [-n NS] [--confirm CTX])" >&2
|
|
1148
1125
|
return 2
|
|
1149
1126
|
fi
|
|
1150
1127
|
ctx="$arg"
|
|
@@ -1153,7 +1130,7 @@ utiliser() {
|
|
|
1153
1130
|
done
|
|
1154
1131
|
if [ -z "$ctx" ]; then
|
|
1155
1132
|
if [ -z "$namespace" ]; then
|
|
1156
|
-
echo "devzone : contexte manquant : devzone
|
|
1133
|
+
echo "devzone : contexte manquant : devzone use CTX" >&2
|
|
1157
1134
|
return 2
|
|
1158
1135
|
fi
|
|
1159
1136
|
courant="$(kubectl config current-context 2>/dev/null || true)"
|
|
@@ -1172,18 +1149,18 @@ utiliser() {
|
|
|
1172
1149
|
if ! cluster_est_local "$ctx"; then
|
|
1173
1150
|
if [ -n "$confirmer" ]; then
|
|
1174
1151
|
if [ "$confirmer" != "$ctx" ]; then
|
|
1175
|
-
echo "devzone : cluster distant refusé : $ctx (--
|
|
1152
|
+
echo "devzone : cluster distant refusé : $ctx (--confirm $ctx)" >&2
|
|
1176
1153
|
return 2
|
|
1177
1154
|
fi
|
|
1178
1155
|
elif cluster_interactif; then
|
|
1179
1156
|
printf 'cluster distant : %s ; tape son nom pour confirmer : ' "$ctx" >&2
|
|
1180
1157
|
read -r reponse || reponse=""
|
|
1181
1158
|
if [ "$reponse" != "$ctx" ]; then
|
|
1182
|
-
echo "devzone : cluster distant refusé : $ctx (--
|
|
1159
|
+
echo "devzone : cluster distant refusé : $ctx (--confirm $ctx)" >&2
|
|
1183
1160
|
return 2
|
|
1184
1161
|
fi
|
|
1185
1162
|
else
|
|
1186
|
-
echo "devzone : cluster distant refusé : $ctx (--
|
|
1163
|
+
echo "devzone : cluster distant refusé : $ctx (--confirm $ctx)" >&2
|
|
1187
1164
|
return 2
|
|
1188
1165
|
fi
|
|
1189
1166
|
fi
|
|
@@ -1200,14 +1177,14 @@ utiliser() {
|
|
|
1200
1177
|
# point à faire avec sa commande (affiché à chaque démarrage)
|
|
1201
1178
|
etat() {
|
|
1202
1179
|
local nom email statut m retards chemin ports_etat relais_marque ctx_travail ctx_hote paquets_marque paquets_noms argocd_repo
|
|
1203
|
-
echo "devzone
|
|
1180
|
+
echo "devzone: state (devzone to show it again)"
|
|
1204
1181
|
ligne_version_disponible
|
|
1205
1182
|
nom="$(git config --get user.name || true)"
|
|
1206
1183
|
email="$(git config --get user.email || true)"
|
|
1207
1184
|
if [ -n "$nom" ] && [ -n "$email" ]; then
|
|
1208
|
-
echo " ✔
|
|
1185
|
+
echo " ✔ git identity $nom <$email>"
|
|
1209
1186
|
else
|
|
1210
|
-
echo " ✖
|
|
1187
|
+
echo " ✖ git identity needed to commit: gh auth login -s workflow (automatic),"
|
|
1211
1188
|
echo " ou git config --file ~/.config/git/config user.name \"<nom>\" et user.email \"<email>\""
|
|
1212
1189
|
fi
|
|
1213
1190
|
if [ "$(plateforme_lue)" = gitlab ]; then
|
|
@@ -1217,16 +1194,16 @@ etat() {
|
|
|
1217
1194
|
ligne_plateforme
|
|
1218
1195
|
url="$(url_gitlab_lue)"
|
|
1219
1196
|
if git config --global --get "credential.$url.helper" 2>/dev/null | grep -q 'glab auth git-credential'; then
|
|
1220
|
-
echo " ✔ git
|
|
1197
|
+
echo " ✔ git via glab"
|
|
1221
1198
|
else
|
|
1222
|
-
echo " ⚠ git
|
|
1199
|
+
echo " ⚠ git via glab to set: devzone platform gitlab"
|
|
1223
1200
|
fi
|
|
1224
1201
|
echo " ○ GitHub inutile ici (plateforme gitlab choisie)"
|
|
1225
1202
|
echo " ⚠ repowarden reste sur GitHub (bots et tickets) : support GitLab à venir (simdevWarden/repowarden#531)"
|
|
1226
1203
|
else
|
|
1227
1204
|
ligne_plateforme
|
|
1228
1205
|
if ! statut="$(gh auth status 2>&1)"; then
|
|
1229
|
-
echo " ○ GitHub
|
|
1206
|
+
echo " ○ GitHub optional (push and PR, repowarden tickets) : gh auth login -s workflow"
|
|
1230
1207
|
elif grep -q "Token scopes:" <<<"$statut" && ! grep -q "'workflow'" <<<"$statut"; then
|
|
1231
1208
|
echo " ⚠ GitHub connecté, sans permission workflow (push de .github/workflows/ refusé) : gh auth refresh -h github.com -s workflow"
|
|
1232
1209
|
else
|
|
@@ -1235,11 +1212,11 @@ etat() {
|
|
|
1235
1212
|
fi
|
|
1236
1213
|
if retards="$(outils_retard)"; then
|
|
1237
1214
|
if [ -z "$retards" ]; then
|
|
1238
|
-
echo " ✔
|
|
1215
|
+
echo " ✔ tools pinned versions"
|
|
1239
1216
|
else
|
|
1240
1217
|
while read -r paquet figee installee; do
|
|
1241
1218
|
[ -n "$paquet" ] || continue
|
|
1242
|
-
echo " ⚠
|
|
1219
|
+
echo " ⚠ tools $paquet $installee installed, $figee pinned: devzone apply"
|
|
1243
1220
|
done <<<"$retards"
|
|
1244
1221
|
fi
|
|
1245
1222
|
fi
|
|
@@ -1252,20 +1229,20 @@ etat() {
|
|
|
1252
1229
|
# Kubernetes workspace pod (#528): presence by the cluster DNS
|
|
1253
1230
|
service_ligne_pod "$m"
|
|
1254
1231
|
elif [ "$(valeur "$m")" = on ] && [ -f "$(fichier_echec "$m")" ]; then
|
|
1255
|
-
printf ' ✖ module %-10s
|
|
1232
|
+
printf ' ✖ module %-10s failed: incomplete install (%s): devzone apply\n' "$m" "$(cat "$(fichier_echec "$m")")"
|
|
1256
1233
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = gitlab ]; then
|
|
1257
1234
|
# GitLab actif : son état réel (prêt, runner, en échec)
|
|
1258
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/gitlab/gitlab.sh"
|
|
1235
|
+
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/gitlab/gitlab.sh" status)"
|
|
1259
1236
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = postgres ]; then
|
|
1260
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/postgres/postgres.sh"
|
|
1237
|
+
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/postgres/postgres.sh" status)"
|
|
1261
1238
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = argocd ]; then
|
|
1262
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/argocd/argocd.sh"
|
|
1239
|
+
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/argocd/argocd.sh" status)"
|
|
1263
1240
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = mysql ]; then
|
|
1264
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/catalogue/mysql/mysql.sh"
|
|
1241
|
+
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/catalogue/mysql/mysql.sh" status)"
|
|
1265
1242
|
elif [ "$(valeur "$m")" = on ]; then
|
|
1266
|
-
printf ' ✔ module %-10s
|
|
1243
|
+
printf ' ✔ module %-10s active: %s\n' "$m" "$(description "$m")"
|
|
1267
1244
|
else
|
|
1268
|
-
printf ' ○ module %-10s
|
|
1245
|
+
printf ' ○ module %-10s optional, %s: devzone enable %s\n' "$m" "$(description "$m")" "$m"
|
|
1269
1246
|
fi
|
|
1270
1247
|
done
|
|
1271
1248
|
# GitOps repository of the instance (#539): the designation of .argocd.conf
|
|
@@ -1303,11 +1280,11 @@ etat() {
|
|
|
1303
1280
|
# Cluster de devzone distant : avertissement dans le récapitulatif
|
|
1304
1281
|
cluster_actuel="$(cluster_lu)"
|
|
1305
1282
|
if [ -n "$cluster_actuel" ] && ! cluster_est_local "$cluster_actuel"; then
|
|
1306
|
-
printf ' ⚠ cluster
|
|
1283
|
+
printf ' ⚠ cluster remote: %s — services on a remote cluster\n' "$cluster_actuel"
|
|
1307
1284
|
fi
|
|
1308
1285
|
# Ancien cluster kind-gitlab encore présent : inviter à migrer (#396)
|
|
1309
1286
|
if kind get clusters 2>/dev/null | grep -qx "gitlab${INSTANCE_SUFFIX}"; then
|
|
1310
|
-
printf ' ⚠
|
|
1287
|
+
printf ' ⚠ old kind-gitlab cluster%s: devzone gitlab migrate\n' "$INSTANCE_SUFFIX"
|
|
1311
1288
|
fi
|
|
1312
1289
|
# Cluster de travail interne (kind) : avertissement dans le recapitulatif
|
|
1313
1290
|
ctx_travail="$(kubectl config current-context 2>/dev/null || true)"
|
|
@@ -1315,7 +1292,7 @@ etat() {
|
|
|
1315
1292
|
kind-gitlab* | kind-devzone*)
|
|
1316
1293
|
ctx_hote="$(KUBECONFIG="${DEVZONE_KUBE_HOTE:-$HOME/.kube/hote.config}" kubectl config current-context 2>/dev/null || true)"
|
|
1317
1294
|
if [ -n "$ctx_hote" ] && cluster_joignable "$ctx_hote"; then
|
|
1318
|
-
printf ' ⚠ cluster de travail : %s (cluster interne de devzone) ; revenir : devzone
|
|
1295
|
+
printf ' ⚠ cluster de travail : %s (cluster interne de devzone) ; revenir : devzone use %s\n' "$ctx_travail" "$ctx_hote"
|
|
1319
1296
|
fi
|
|
1320
1297
|
;;
|
|
1321
1298
|
esac
|
|
@@ -1326,18 +1303,18 @@ etat() {
|
|
|
1326
1303
|
fi
|
|
1327
1304
|
ports_etat="$(bash "$ICI/ports.sh" resume 2>/dev/null || true)"
|
|
1328
1305
|
case "$ports_etat" in
|
|
1329
|
-
|
|
1330
|
-
*) printf ' ✔ ports
|
|
1306
|
+
none*) printf ' ○ ports to the workstation %s\n' "$ports_etat" ;;
|
|
1307
|
+
*) printf ' ✔ ports to the workstation %s\n' "$ports_etat" ;;
|
|
1331
1308
|
esac
|
|
1332
1309
|
# Identifiants regroupés (#332) : le chemin seulement, jamais le contenu
|
|
1333
1310
|
if [ -f "$RACINE/.password" ]; then
|
|
1334
|
-
printf ' ○
|
|
1311
|
+
printf ' ○ credentials: %s\n' "$RACINE/.password"
|
|
1335
1312
|
fi
|
|
1336
1313
|
# Marque posée par docker-relais.sh au démarrage (#293) : docker exec
|
|
1337
1314
|
# longs coupés, kind et modules en échec
|
|
1338
1315
|
relais_marque="${DEVZONE_RELAIS_MARQUE:-/tmp/devzone-relais-docker.echec}"
|
|
1339
1316
|
if [ -f "$relais_marque" ]; then
|
|
1340
|
-
printf ' ⚠
|
|
1317
|
+
printf ' ⚠ Docker relay %s: devzone repair\n' "$(head -1 "$relais_marque")"
|
|
1341
1318
|
fi
|
|
1342
1319
|
# Marque posee par paquets.sh a l echec de reapplication (351) : noms des paquets non installes
|
|
1343
1320
|
paquets_marque="${DEVZONE_PAQUETS_MARQUE:-/tmp/devzone-paquets.echec}"
|
|
@@ -1348,7 +1325,7 @@ etat() {
|
|
|
1348
1325
|
paquets_noms="${paquets_noms:+$paquets_noms, }$n"
|
|
1349
1326
|
fi
|
|
1350
1327
|
done < "$paquets_marque"
|
|
1351
|
-
echo " ⚠
|
|
1328
|
+
echo " ⚠ packages $paquets_noms: devzone packages"
|
|
1352
1329
|
fi
|
|
1353
1330
|
}
|
|
1354
1331
|
|
|
@@ -1375,7 +1352,7 @@ changer() {
|
|
|
1375
1352
|
# Une application du catalogue : on écrit la ligne, on applique
|
|
1376
1353
|
if [ -f "$ICI/catalogue/$m/app.conf" ]; then
|
|
1377
1354
|
ecrire "$m" "$1"
|
|
1378
|
-
bash "$ICI/catalogue.sh"
|
|
1355
|
+
bash "$ICI/catalogue.sh" apply
|
|
1379
1356
|
return
|
|
1380
1357
|
fi
|
|
1381
1358
|
echo "devzone : module inconnu : $m ; modules : ${MODULES[*]}" >&2
|
|
@@ -1415,6 +1392,17 @@ if [ "$#" -gt 0 ]; then
|
|
|
1415
1392
|
set -- "$canon" "${@:2}"
|
|
1416
1393
|
fi
|
|
1417
1394
|
|
|
1395
|
+
# Options of activer, desactiver, cluster and utiliser take their English names
|
|
1396
|
+
# (#557) : --context, --confirm, --yes ; the French ones warn (--oui included).
|
|
1397
|
+
case "${1:-}" in
|
|
1398
|
+
activer | desactiver | cluster | utiliser)
|
|
1399
|
+
if command -v canonical_args >/dev/null 2>&1; then
|
|
1400
|
+
canonical_args "$1" "${@:2}"
|
|
1401
|
+
set -- "$1" "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
1402
|
+
fi
|
|
1403
|
+
;;
|
|
1404
|
+
esac
|
|
1405
|
+
|
|
1418
1406
|
case "${1:-}" in
|
|
1419
1407
|
"" | etat | modules) if [ "${2:-}" = "--json" ]; then etat_json; else etat; fi ;;
|
|
1420
1408
|
activer) changer on "${2:-}" "${@:3}" ;;
|
|
@@ -1454,7 +1442,7 @@ case "${1:-}" in
|
|
|
1454
1442
|
postgres) DEVZONE_ETAT="$ETAT" bash "$ICI/postgres/postgres.sh" "${@:2}" ;;
|
|
1455
1443
|
mysql) DEVZONE_ETAT="$ETAT" bash "$ICI/catalogue/mysql/mysql.sh" "${@:2}" ;;
|
|
1456
1444
|
gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/gitlab.sh" "${@:2}" ;;
|
|
1457
|
-
catalogue) DEVZONE_ETAT="$ETAT" bash "$ICI/catalogue.sh"
|
|
1445
|
+
catalogue) DEVZONE_ETAT="$ETAT" bash "$ICI/catalogue.sh" list ;;
|
|
1458
1446
|
argocd) DEVZONE_ETAT="$ETAT" bash "$ICI/argocd/argocd.sh" "${@:2}" ;;
|
|
1459
1447
|
port) DEVZONE_ETAT="$ETAT" bash "$ICI/ports.sh" "${@:2}" ;;
|
|
1460
1448
|
paquets) bash "$ICI/paquets.sh" "${@:2}" ;;
|
|
@@ -1463,7 +1451,7 @@ case "${1:-}" in
|
|
|
1463
1451
|
echo "devzone : identifiants regroupés non mis à jour" >&2
|
|
1464
1452
|
bash "$ICI/password.sh" chemin
|
|
1465
1453
|
;;
|
|
1466
|
-
-h | --help | aide)
|
|
1454
|
+
-h | --help | aide) devzone_aide ;;
|
|
1467
1455
|
test-bash32) bash "$RACINE/manage/test/bash32.sh" ;;
|
|
1468
1456
|
test-gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/test-gitlab.sh" "${@:2}" ;;
|
|
1469
1457
|
plateforme)
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#
|
|
19
19
|
# Sûr par construction : chemins et commandes réglables (tests : tout sous un
|
|
20
20
|
# dossier temporaire), et refus de toucher au vrai socket sans
|
|
21
|
-
# DEVZONE_RELAIS_REEL=oui, que seuls demarrage.sh et devzone
|
|
21
|
+
# DEVZONE_RELAIS_REEL=oui, que seuls demarrage.sh et devzone repair posent.
|
|
22
22
|
# Code : 0 contrôle réussi, 1 contrôle en échec (marque écrite pour le
|
|
23
23
|
# récapitulatif devzone), 2 refus de la garde. Compatible bash 3.2.
|
|
24
24
|
set -euo pipefail
|
|
@@ -49,7 +49,7 @@ if [ -n "${BATS_TEST_TMPDIR:-}" ] && [ "$SOCKET" = /var/run/docker.sock ]; then
|
|
|
49
49
|
fi
|
|
50
50
|
|
|
51
51
|
if [ "$SOCKET" = /var/run/docker.sock ] && [ "${DEVZONE_RELAIS_REEL:-}" != oui ]; then
|
|
52
|
-
echo "docker-relais : refus de toucher au vrai socket ($SOCKET) : lancer plutôt devzone
|
|
52
|
+
echo "docker-relais : refus de toucher au vrai socket ($SOCKET) : lancer plutôt devzone repair" >&2
|
|
53
53
|
exit 2
|
|
54
54
|
fi
|
|
55
55
|
|