devzone 0.59.0 → 1.0.0
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-workspace.sh +1 -1
- package/.devcontainer/argocd/argocd.sh +0 -12
- package/.devcontainer/catalogue/mysql/mysql.sh +0 -12
- package/.devcontainer/catalogue.sh +1 -13
- package/.devcontainer/command-aliases.sh +78 -114
- package/.devcontainer/devzone +21 -36
- package/.devcontainer/gitlab/gitlab.sh +0 -12
- package/.devcontainer/gitlab/test-gitlab.sh +1 -1
- package/.devcontainer/help.sh +3 -3
- package/.devcontainer/paquets.sh +0 -12
- package/.devcontainer/ports.sh +0 -12
- package/.devcontainer/postgres/postgres.sh +0 -12
- package/.devcontainer/skills/devzone/SKILL.md +2 -2
- package/README.md +11 -1
- package/manage/devzone +61 -569
- package/manage/scripts/argocd-services.sh +2 -2
- package/manage/scripts/devzone-create.sh +138 -0
- package/manage/scripts/devzone-manifest.sh +171 -0
- package/manage/scripts/devzone-update.sh +222 -0
- package/manage/scripts/migrer.sh +2 -6
- package/manage/scripts/workspace-aliases.sh +4 -31
- package/manage/workspace.sh +7 -12
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ agent_workspace() {
|
|
|
67
67
|
nom="$(basename "$(cd "$dossier" && pwd -P)")"
|
|
68
68
|
dans_pod="/workspaces/projets/$nom"
|
|
69
69
|
if ! agent_kc exec devzone-workspace-0 -c workspace -- test -d "$dans_pod" 2>/dev/null; then
|
|
70
|
-
refuse "projet $nom absent du workspace Kubernetes : devzone workspace
|
|
70
|
+
refuse "projet $nom absent du workspace Kubernetes : devzone workspace copy-to $dossier (sur la machine), ou --local"
|
|
71
71
|
fi
|
|
72
72
|
fi
|
|
73
73
|
echo "devzone agent : workspace Kubernetes (pod devzone-workspace-0, $dans_pod) ; --local pour le conteneur"
|
|
@@ -190,18 +190,6 @@ ARGOCD_CONF="${DEVZONE_ARGOCD_CONF:-$RACINE/.argocd.conf}"
|
|
|
190
190
|
# shellcheck disable=SC1091
|
|
191
191
|
. "$ICI/apps.sh"
|
|
192
192
|
argocd_kubectl() { kubectl --context devzone "$@"; }
|
|
193
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
194
|
-
# shellcheck source=SCRIPTDIR/../command-aliases.sh
|
|
195
|
-
# shellcheck disable=SC1091
|
|
196
|
-
if [ -f "$ICI/../command-aliases.sh" ]; then
|
|
197
|
-
. "$ICI/../command-aliases.sh"
|
|
198
|
-
fi
|
|
199
|
-
# Subcommand and options become their canonical English names ; the old
|
|
200
|
-
# French names warn on use (#557)
|
|
201
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
202
|
-
canonical_args argocd "$@"
|
|
203
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
204
|
-
fi
|
|
205
193
|
|
|
206
194
|
case "${1:-}" in
|
|
207
195
|
install) installer ;;
|
|
@@ -23,18 +23,6 @@ ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
|
23
23
|
# shellcheck source=SCRIPTDIR/../../argocd/catalogue-argocd.sh
|
|
24
24
|
# shellcheck disable=SC1091
|
|
25
25
|
. "$ICI/../../argocd/catalogue-argocd.sh"
|
|
26
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
27
|
-
# shellcheck source=SCRIPTDIR/../../command-aliases.sh
|
|
28
|
-
# shellcheck disable=SC1091
|
|
29
|
-
if [ -f "$ICI/../../command-aliases.sh" ]; then
|
|
30
|
-
. "$ICI/../../command-aliases.sh"
|
|
31
|
-
fi
|
|
32
|
-
# Subcommand and options become their canonical English names ; the old
|
|
33
|
-
# French names warn on use (#557)
|
|
34
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
35
|
-
canonical_args mysql "$@"
|
|
36
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
37
|
-
fi
|
|
38
26
|
NS=devzone-mysql
|
|
39
27
|
SECRETS="$RACINE/workspace/.mysql"
|
|
40
28
|
MYSQL_PORT="${MYSQL_PORT:-3306}"
|
|
@@ -24,18 +24,6 @@ ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
|
24
24
|
# shellcheck source=SCRIPTDIR/catalogue/app.sh
|
|
25
25
|
# shellcheck disable=SC1091
|
|
26
26
|
. "$ICI/catalogue/app.sh"
|
|
27
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
28
|
-
# shellcheck source=SCRIPTDIR/command-aliases.sh
|
|
29
|
-
# shellcheck disable=SC1091
|
|
30
|
-
if [ -f "$ICI/command-aliases.sh" ]; then
|
|
31
|
-
. "$ICI/command-aliases.sh"
|
|
32
|
-
fi
|
|
33
|
-
# Subcommand and options become their canonical English names ; the old
|
|
34
|
-
# French names warn on use (#557)
|
|
35
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
36
|
-
canonical_args catalog "$@"
|
|
37
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
38
|
-
fi
|
|
39
27
|
|
|
40
28
|
refuse() { echo "devzone : catalogue : $*" >&2; exit 2; }
|
|
41
29
|
|
|
@@ -169,7 +157,7 @@ app_relais_arrete() {
|
|
|
169
157
|
fi
|
|
170
158
|
script="$ICI/catalogue/$app/$app.sh"
|
|
171
159
|
if [ -f "$script" ]; then
|
|
172
|
-
etat="$(bash "$script"
|
|
160
|
+
etat="$(bash "$script" status 2>/dev/null || true)"
|
|
173
161
|
case "$etat" in *"relais arrêté"*) return 0 ;; esac
|
|
174
162
|
fi
|
|
175
163
|
! relais_actif "$app"
|
|
@@ -1,47 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# Renamed names of the devzone CLI (#695): the French names of the commands,
|
|
3
|
+
# subcommands and options are no longer accepted, they are refused. Each old
|
|
4
|
+
# name prints « ✖ « old » a été renommé : devzone new » on stderr, exits with
|
|
5
|
+
# code 1 and does nothing (no folder is created: « devzone stop » creates ./stop,
|
|
6
|
+
# « devzone mettre-a-jour » must not create ./mettre-a-jour).
|
|
3
7
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
8
|
+
# renamed_command <name> : English name of a renamed command, or 1
|
|
9
|
+
# renamed_subcommand <command> <name> : English name of a renamed subcommand, or 1
|
|
10
|
+
# renamed_option <option> : English name of a renamed option, or 1
|
|
11
|
+
# reject_renamed <command> <args...> : refuses the first renamed name of a call
|
|
12
|
+
# (command, first word that is not an
|
|
13
|
+
# option, then each option); 0 if none
|
|
6
14
|
#
|
|
7
|
-
#
|
|
8
|
-
# English name; otherwise the name unchanged (empty stays empty).
|
|
9
|
-
#
|
|
10
|
-
# Subcommands and options follow the same rule (#557): the table below gives
|
|
11
|
-
# the canonical English name of each French subcommand, per command, and the
|
|
12
|
-
# canonical English name of each French option.
|
|
13
|
-
|
|
14
|
-
command_canonical() {
|
|
15
|
-
case "${1:-}" in
|
|
16
|
-
is-enabled) echo actif ;;
|
|
17
|
-
enable) echo activer ;;
|
|
18
|
-
disable) echo desactiver ;;
|
|
19
|
-
ai) echo ia ;;
|
|
20
|
-
help) echo aide ;;
|
|
21
|
-
apply) echo appliquer ;;
|
|
22
|
-
catalog) echo catalogue ;;
|
|
23
|
-
start) echo demarrer ;;
|
|
24
|
-
stop) echo arreter ;;
|
|
25
|
-
status) echo etat ;;
|
|
26
|
-
passwords) echo mots-de-passe ;;
|
|
27
|
-
packages) echo paquets ;;
|
|
28
|
-
platform) echo plateforme ;;
|
|
29
|
-
repair) echo reparer ;;
|
|
30
|
-
use) echo utiliser ;;
|
|
31
|
-
update) echo mettre-a-jour ;;
|
|
32
|
-
uninstall) echo desinstaller ;;
|
|
33
|
-
copy-to) echo copier-vers ;;
|
|
34
|
-
copy-from) echo copier-depuis ;;
|
|
35
|
-
migrate) echo migrer ;;
|
|
36
|
-
revert) echo revenir ;;
|
|
37
|
-
clean-docker) echo nettoyer-docker ;;
|
|
38
|
-
*) printf '%s\n' "${1:-}" ;;
|
|
39
|
-
esac
|
|
40
|
-
}
|
|
15
|
+
# bash 3.2 (macOS): case only, no associative array.
|
|
41
16
|
|
|
42
|
-
# English name of a
|
|
43
|
-
|
|
44
|
-
command_english() {
|
|
17
|
+
# English name of a renamed command, or return 1.
|
|
18
|
+
renamed_command() {
|
|
45
19
|
case "${1:-}" in
|
|
46
20
|
actif) echo is-enabled ;;
|
|
47
21
|
activer) echo enable ;;
|
|
@@ -65,29 +39,12 @@ command_english() {
|
|
|
65
39
|
migrer) echo migrate ;;
|
|
66
40
|
revenir) echo revert ;;
|
|
67
41
|
nettoyer-docker) echo clean-docker ;;
|
|
68
|
-
*)
|
|
42
|
+
*) return 1 ;;
|
|
69
43
|
esac
|
|
70
44
|
}
|
|
71
45
|
|
|
72
|
-
#
|
|
73
|
-
|
|
74
|
-
# for a French name of the table; silent for an English name, an unknown
|
|
75
|
-
# name and DEVZONE_NO_DEPRECATION=1. The exit code is always 0.
|
|
76
|
-
command_deprecated_warning() {
|
|
77
|
-
local word="${1:-}" english
|
|
78
|
-
[ -n "$word" ] || return 0
|
|
79
|
-
english="$(command_english "$word")"
|
|
80
|
-
[ "$english" != "$word" ] || return 0
|
|
81
|
-
if [ "${DEVZONE_NO_DEPRECATION:-}" != 1 ]; then
|
|
82
|
-
echo "devzone: \"$word\" is deprecated, use \"$english\"" >&2
|
|
83
|
-
fi
|
|
84
|
-
return 0
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
# subcommand_canonical <command> <word> : the canonical English name of a
|
|
88
|
-
# subcommand of a command (#557). The French names are accepted and warn on
|
|
89
|
-
# use; an unknown word is printed unchanged.
|
|
90
|
-
subcommand_canonical() {
|
|
46
|
+
# English name of a renamed subcommand of <command> (English name), or return 1.
|
|
47
|
+
renamed_subcommand() {
|
|
91
48
|
local command="${1:-}" word="${2:-}"
|
|
92
49
|
case "$command" in
|
|
93
50
|
postgres | mysql)
|
|
@@ -103,7 +60,7 @@ subcommand_canonical() {
|
|
|
103
60
|
relais-arreter) echo relay-stop ;;
|
|
104
61
|
autoriser) echo authorize ;;
|
|
105
62
|
interdire) echo forbid ;;
|
|
106
|
-
*)
|
|
63
|
+
*) return 1 ;;
|
|
107
64
|
esac
|
|
108
65
|
;;
|
|
109
66
|
gitlab)
|
|
@@ -116,7 +73,7 @@ subcommand_canonical() {
|
|
|
116
73
|
relais-lancer) echo relay-start ;;
|
|
117
74
|
relais-arreter) echo relay-stop ;;
|
|
118
75
|
relais-etat) echo relay-status ;;
|
|
119
|
-
*)
|
|
76
|
+
*) return 1 ;;
|
|
120
77
|
esac
|
|
121
78
|
;;
|
|
122
79
|
argocd)
|
|
@@ -126,7 +83,7 @@ subcommand_canonical() {
|
|
|
126
83
|
desinstaller) echo uninstall ;;
|
|
127
84
|
relais-lancer) echo relay-start ;;
|
|
128
85
|
relais-arreter) echo relay-stop ;;
|
|
129
|
-
*)
|
|
86
|
+
*) return 1 ;;
|
|
130
87
|
esac
|
|
131
88
|
;;
|
|
132
89
|
packages)
|
|
@@ -135,7 +92,7 @@ subcommand_canonical() {
|
|
|
135
92
|
retirer) echo remove ;;
|
|
136
93
|
appliquer) echo apply ;;
|
|
137
94
|
lister) echo list ;;
|
|
138
|
-
*)
|
|
95
|
+
*) return 1 ;;
|
|
139
96
|
esac
|
|
140
97
|
;;
|
|
141
98
|
catalog)
|
|
@@ -144,7 +101,7 @@ subcommand_canonical() {
|
|
|
144
101
|
appliquer) echo apply ;;
|
|
145
102
|
lister) echo list ;;
|
|
146
103
|
desinstaller) echo remove ;;
|
|
147
|
-
*)
|
|
104
|
+
*) return 1 ;;
|
|
148
105
|
esac
|
|
149
106
|
;;
|
|
150
107
|
port)
|
|
@@ -155,16 +112,38 @@ subcommand_canonical() {
|
|
|
155
112
|
relancer) echo restart ;;
|
|
156
113
|
exclure) echo exclude ;;
|
|
157
114
|
inclure) echo include ;;
|
|
158
|
-
*)
|
|
115
|
+
*) return 1 ;;
|
|
116
|
+
esac
|
|
117
|
+
;;
|
|
118
|
+
workspace)
|
|
119
|
+
case "$word" in
|
|
120
|
+
demarrer) echo start ;;
|
|
121
|
+
mettre-a-jour) echo update ;;
|
|
122
|
+
arreter) echo stop ;;
|
|
123
|
+
etat) echo status ;;
|
|
124
|
+
copier-vers) echo copy-to ;;
|
|
125
|
+
copier-depuis) echo copy-from ;;
|
|
126
|
+
migrer) echo migrate ;;
|
|
127
|
+
revenir) echo revert ;;
|
|
128
|
+
nettoyer-docker) echo clean-docker ;;
|
|
129
|
+
aide) echo help ;;
|
|
130
|
+
*) return 1 ;;
|
|
159
131
|
esac
|
|
160
132
|
;;
|
|
161
|
-
|
|
133
|
+
"workspace ports")
|
|
134
|
+
case "$word" in
|
|
135
|
+
demarrer) echo start ;;
|
|
136
|
+
arreter) echo stop ;;
|
|
137
|
+
etat) echo status ;;
|
|
138
|
+
*) return 1 ;;
|
|
139
|
+
esac
|
|
140
|
+
;;
|
|
141
|
+
*) return 1 ;;
|
|
162
142
|
esac
|
|
163
143
|
}
|
|
164
144
|
|
|
165
|
-
#
|
|
166
|
-
|
|
167
|
-
option_canonical() {
|
|
145
|
+
# English name of a renamed option, or return 1.
|
|
146
|
+
renamed_option() {
|
|
168
147
|
case "${1:-}" in
|
|
169
148
|
--fermer) echo --close ;;
|
|
170
149
|
--supprimer) echo --delete ;;
|
|
@@ -172,58 +151,43 @@ option_canonical() {
|
|
|
172
151
|
--oui) echo --yes ;;
|
|
173
152
|
--confirmer) echo --confirm ;;
|
|
174
153
|
--contexte) echo --context ;;
|
|
175
|
-
|
|
154
|
+
--rapatrier) echo --bring-back ;;
|
|
155
|
+
*) return 1 ;;
|
|
176
156
|
esac
|
|
177
157
|
}
|
|
178
158
|
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
[ "
|
|
186
|
-
if
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
# DEVZONE_NO_DEPRECATION as command_deprecated_warning.
|
|
194
|
-
option_deprecated_warning() {
|
|
195
|
-
local word="${1:-}" english
|
|
196
|
-
[ -n "$word" ] || return 0
|
|
197
|
-
english="$(option_canonical "$word")"
|
|
198
|
-
[ "$english" != "$word" ] || return 0
|
|
199
|
-
if [ "${DEVZONE_NO_DEPRECATION:-}" != 1 ]; then
|
|
200
|
-
echo "devzone: \"$word\" is deprecated, use \"$english\"" >&2
|
|
159
|
+
# reject_renamed <command> <args...> : checks the command itself (top level),
|
|
160
|
+
# the first word of <args> that is not an option (subcommand), then every
|
|
161
|
+
# option. The first renamed name prints its message on stderr and returns 1;
|
|
162
|
+
# nothing is run. Returns 0 when no name is renamed.
|
|
163
|
+
reject_renamed() {
|
|
164
|
+
local command="${1:-}" word new
|
|
165
|
+
if [ "$#" -gt 0 ]; then shift; fi
|
|
166
|
+
if new="$(renamed_command "$command")"; then
|
|
167
|
+
# these commands only exist under « devzone workspace »
|
|
168
|
+
case "$command" in
|
|
169
|
+
migrer | revenir | copier-vers | copier-depuis | nettoyer-docker) new="workspace $new" ;;
|
|
170
|
+
esac
|
|
171
|
+
printf '✖ « %s » a été renommé : devzone %s\n' "$command" "$new" >&2
|
|
172
|
+
return 1
|
|
201
173
|
fi
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
ARGS_CANONICAL=()
|
|
174
|
+
for word in "$@"; do
|
|
175
|
+
case "$word" in
|
|
176
|
+
-*) continue ;;
|
|
177
|
+
esac
|
|
178
|
+
if new="$(renamed_subcommand "$command" "$word")"; then
|
|
179
|
+
printf '✖ « %s » a été renommé : devzone %s %s\n' "$word" "$command" "$new" >&2
|
|
180
|
+
return 1
|
|
181
|
+
fi
|
|
182
|
+
break
|
|
183
|
+
done
|
|
213
184
|
for word in "$@"; do
|
|
214
185
|
case "$word" in
|
|
215
186
|
-*)
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
*)
|
|
220
|
-
if [ "$premier" = 1 ]; then
|
|
221
|
-
premier=0
|
|
222
|
-
canon="$(subcommand_canonical "$command" "$word")"
|
|
223
|
-
subcommand_deprecated_warning "$command" "$word"
|
|
224
|
-
word="$canon"
|
|
187
|
+
if new="$(renamed_option "$word")"; then
|
|
188
|
+
printf '✖ « %s » a été renommé : %s\n' "$word" "$new" >&2
|
|
189
|
+
return 1
|
|
225
190
|
fi
|
|
226
|
-
ARGS_CANONICAL+=("$word")
|
|
227
191
|
;;
|
|
228
192
|
esac
|
|
229
193
|
done
|
package/.devcontainer/devzone
CHANGED
|
@@ -64,7 +64,7 @@ fi
|
|
|
64
64
|
# change pas : deux montées simultanées (workflow versions) se fusionnent sans
|
|
65
65
|
# conflit, git n'en signalant qu'entre lignes voisines modifiées.
|
|
66
66
|
# Claude Code
|
|
67
|
-
IA_CLAUDE=@anthropic-ai/claude-code@2.1.
|
|
67
|
+
IA_CLAUDE=@anthropic-ai/claude-code@2.1.329
|
|
68
68
|
# opencode
|
|
69
69
|
IA_OPENCODE=opencode-ai@1.19.6
|
|
70
70
|
IA_PAQUETS=("$IA_CLAUDE" "$IA_OPENCODE")
|
|
@@ -737,8 +737,8 @@ appliquer_mysql() {
|
|
|
737
737
|
|
|
738
738
|
# Toutes les bases disparaissent : confirmation en terminal (sans terminal, la
|
|
739
739
|
# commande est explicite) ; un oui ou --yes marque SUPPRIMER_DONNEES, lu par
|
|
740
|
-
# appliquer_mysql pour lancer
|
|
741
|
-
# par
|
|
740
|
+
# appliquer_mysql pour lancer delete-data (#441). Les arguments passent
|
|
741
|
+
# par reject_renamed : --oui est refusé avant d'arriver ici, seul --yes passe (#695).
|
|
742
742
|
confirmer_suppression() {
|
|
743
743
|
local app="$1" reponse arg
|
|
744
744
|
SUPPRIMER_DONNEES=""
|
|
@@ -1523,32 +1523,17 @@ if [ -f "$ICI/etat-json.sh" ]; then
|
|
|
1523
1523
|
. "$ICI/etat-json.sh"
|
|
1524
1524
|
fi
|
|
1525
1525
|
|
|
1526
|
-
#
|
|
1527
|
-
#
|
|
1528
|
-
if
|
|
1529
|
-
|
|
1530
|
-
if command -v command_deprecated_warning >/dev/null 2>&1; then
|
|
1531
|
-
command_deprecated_warning "$1"
|
|
1532
|
-
fi
|
|
1533
|
-
set -- "$canon" "${@:2}"
|
|
1526
|
+
# Renamed names (#695): an old French name is refused with its new name, before
|
|
1527
|
+
# anything runs (exit 1). Without the aliases file (copied devzone): no check.
|
|
1528
|
+
if command -v reject_renamed >/dev/null 2>&1; then
|
|
1529
|
+
reject_renamed "$@" || exit 1
|
|
1534
1530
|
fi
|
|
1535
1531
|
|
|
1536
|
-
# Options of activer, desactiver, cluster and utiliser take their English names
|
|
1537
|
-
# (#557) : --context, --confirm, --yes ; the French ones warn (--oui included).
|
|
1538
|
-
case "${1:-}" in
|
|
1539
|
-
activer | desactiver | cluster | utiliser)
|
|
1540
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
1541
|
-
canonical_args "$1" "${@:2}"
|
|
1542
|
-
set -- "$1" "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
1543
|
-
fi
|
|
1544
|
-
;;
|
|
1545
|
-
esac
|
|
1546
|
-
|
|
1547
1532
|
case "${1:-}" in
|
|
1548
|
-
"" |
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1533
|
+
"" | status | modules) if [ "${2:-}" = "--json" ]; then etat_json; else etat; fi ;;
|
|
1534
|
+
enable) changer on "${2:-}" "${@:3}" ;;
|
|
1535
|
+
disable) changer off "${2:-}" "${@:3}" ;;
|
|
1536
|
+
apply)
|
|
1552
1537
|
migrer_llm
|
|
1553
1538
|
# L'utilisateur confirme l'état courant (#417, étape 4) : les
|
|
1554
1539
|
# veilleurs peuvent de nouveau désinstaller
|
|
@@ -1562,7 +1547,7 @@ case "${1:-}" in
|
|
|
1562
1547
|
[ "$(valeur mysql)" = off ] || appliquer_mysql on
|
|
1563
1548
|
[ "$(valeur argocd)" = off ] || appliquer_service argocd
|
|
1564
1549
|
;;
|
|
1565
|
-
|
|
1550
|
+
is-enabled)
|
|
1566
1551
|
connu "${2:-}" || { echo "devzone : module inconnu : ${2:-(aucun)}" >&2; exit 2; }
|
|
1567
1552
|
# Test silencieux, appelé par les scripts de démarrage : code 0 si le
|
|
1568
1553
|
# module est actif, 1 sinon, sans rien écrire (kube-config.sh:16)
|
|
@@ -1571,7 +1556,7 @@ case "${1:-}" in
|
|
|
1571
1556
|
agent)
|
|
1572
1557
|
bash "$ICI/agent.sh" "${@:2}"
|
|
1573
1558
|
;;
|
|
1574
|
-
|
|
1559
|
+
ai)
|
|
1575
1560
|
case "${2:-}" in
|
|
1576
1561
|
check)
|
|
1577
1562
|
# Read-only: update state of each detected host model (#668).
|
|
@@ -1601,28 +1586,28 @@ case "${1:-}" in
|
|
|
1601
1586
|
build)
|
|
1602
1587
|
bash "$ICI/workspace-build.sh" "${@:2}"
|
|
1603
1588
|
;;
|
|
1604
|
-
|
|
1605
|
-
|
|
1589
|
+
repair) reparer ;;
|
|
1590
|
+
start) bash "$ICI/demarrage.sh" ;;
|
|
1606
1591
|
metrics) bash "$ICI/metrics-server.sh" "${@:2}" ;;
|
|
1607
|
-
|
|
1592
|
+
use) utiliser "${@:2}" ;;
|
|
1608
1593
|
clusters) DEVZONE_ETAT="$ETAT" bash "$ICI/clusters.sh" "${@:2}" ;;
|
|
1609
1594
|
cluster) changer_cluster "${@:2}" ;;
|
|
1610
1595
|
postgres) DEVZONE_ETAT="$ETAT" bash "$ICI/postgres/postgres.sh" "${@:2}" ;;
|
|
1611
1596
|
mysql) DEVZONE_ETAT="$ETAT" bash "$ICI/catalogue/mysql/mysql.sh" "${@:2}" ;;
|
|
1612
1597
|
gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/gitlab.sh" "${@:2}" ;;
|
|
1613
|
-
|
|
1598
|
+
catalog) DEVZONE_ETAT="$ETAT" bash "$ICI/catalogue.sh" list ;;
|
|
1614
1599
|
argocd) DEVZONE_ETAT="$ETAT" bash "$ICI/argocd/argocd.sh" "${@:2}" ;;
|
|
1615
1600
|
port) DEVZONE_ETAT="$ETAT" bash "$ICI/ports.sh" "${@:2}" ;;
|
|
1616
|
-
|
|
1617
|
-
|
|
1601
|
+
packages) bash "$ICI/paquets.sh" "${@:2}" ;;
|
|
1602
|
+
passwords)
|
|
1618
1603
|
bash "$ICI/password.sh" regenerer ||
|
|
1619
1604
|
echo "devzone : identifiants regroupés non mis à jour" >&2
|
|
1620
1605
|
bash "$ICI/password.sh" chemin
|
|
1621
1606
|
;;
|
|
1622
|
-
-h | --help |
|
|
1607
|
+
-h | --help | help) devzone_aide ;;
|
|
1623
1608
|
test-bash32) bash "$RACINE/manage/test/bash32.sh" ;;
|
|
1624
1609
|
test-gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/test-gitlab.sh" "${@:2}" ;;
|
|
1625
|
-
|
|
1610
|
+
platform)
|
|
1626
1611
|
if [ -n "${2:-}" ]; then
|
|
1627
1612
|
changer_plateforme "${@:2}"
|
|
1628
1613
|
else
|
|
@@ -17,18 +17,6 @@ RACINE="${DEVZONE_RACINE:-$(dirname "$(dirname "$ICI")")}"
|
|
|
17
17
|
# shellcheck source=SCRIPTDIR/../isolement.sh
|
|
18
18
|
# shellcheck disable=SC1091
|
|
19
19
|
. "$ICI/../isolement.sh"
|
|
20
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
21
|
-
# shellcheck source=SCRIPTDIR/../command-aliases.sh
|
|
22
|
-
# shellcheck disable=SC1091
|
|
23
|
-
if [ -f "$ICI/../command-aliases.sh" ]; then
|
|
24
|
-
. "$ICI/../command-aliases.sh"
|
|
25
|
-
fi
|
|
26
|
-
# Subcommand and options become their canonical English names ; the old
|
|
27
|
-
# French names warn on use (#557)
|
|
28
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
29
|
-
canonical_args gitlab "$@"
|
|
30
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
31
|
-
fi
|
|
32
20
|
|
|
33
21
|
# ---- Variables de délai (secondes) ----
|
|
34
22
|
# GITLAB_ATTENTE : attente globale d'installation (défaut 1200)
|
|
@@ -150,7 +150,7 @@ etape_module() {
|
|
|
150
150
|
# pipeline resterait en attente).
|
|
151
151
|
etape_etat() {
|
|
152
152
|
local etat
|
|
153
|
-
etat="$(bash "$GITLAB"
|
|
153
|
+
etat="$(bash "$GITLAB" status 2>&1 || true)"
|
|
154
154
|
if [[ "$etat" != *"prêt"* ]]; then
|
|
155
155
|
RAISON="état : ${etat:-illisible}"
|
|
156
156
|
return 1
|
package/.devcontainer/help.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Help of devzone (devzone --help, #557), sourced by devzone : English command
|
|
3
|
-
# names
|
|
3
|
+
# names only ; the French names are refused and print the new name (#695).
|
|
4
4
|
# devzone_aide prints the list, indented like the other usage texts.
|
|
5
5
|
devzone_aide() {
|
|
6
6
|
cat <<'AIDE'
|
|
@@ -21,7 +21,7 @@ devzone_aide() {
|
|
|
21
21
|
devzone test-bash32 run the bats tests under bash 3.2 (Docker container)
|
|
22
22
|
devzone test-gitlab end-to-end test of the GitLab module and platform
|
|
23
23
|
devzone agent <folder> <instructions> drive opencode with the instructions file
|
|
24
|
-
devzone ai
|
|
24
|
+
devzone ai list the host (Ollama) models detected and the default model
|
|
25
25
|
devzone ticket <n> [--repo devzone|repowarden] ticket worktree (ticket done <n> removes it)
|
|
26
26
|
devzone build <folder> [--tag <name>] build an image in the Kubernetes workspace (BuildKit)
|
|
27
27
|
devzone enable postgres [--context CTX] [--confirm CTX] shared PostgreSQL, cluster of choice
|
|
@@ -38,6 +38,6 @@ devzone_aide() {
|
|
|
38
38
|
devzone port [<n>|--close <n>] relay of a container port to the workstation
|
|
39
39
|
devzone passwords regenerate .password and print its path
|
|
40
40
|
devzone packages [add|remove|apply] … system packages kept after a rebuild
|
|
41
|
-
Old French names are
|
|
41
|
+
Old French names are refused and print the new name (see the reference).
|
|
42
42
|
AIDE
|
|
43
43
|
}
|
package/.devcontainer/paquets.sh
CHANGED
|
@@ -26,18 +26,6 @@ FORMAT="-f=\${Status}"
|
|
|
26
26
|
ENTETE="# paquets ajoutés par devzone packages add ; réinstallés à chaque création du conteneur"
|
|
27
27
|
PRESENT="# déjà présent"
|
|
28
28
|
|
|
29
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
30
|
-
# shellcheck source=SCRIPTDIR/command-aliases.sh
|
|
31
|
-
# shellcheck disable=SC1091
|
|
32
|
-
if [ -f "$ICI/command-aliases.sh" ]; then
|
|
33
|
-
. "$ICI/command-aliases.sh"
|
|
34
|
-
fi
|
|
35
|
-
# Subcommand and options become their canonical English names ; the old
|
|
36
|
-
# French names warn on use (#557)
|
|
37
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
38
|
-
canonical_args packages "$@"
|
|
39
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
40
|
-
fi
|
|
41
29
|
|
|
42
30
|
refuse() { echo "devzone : paquets : $*" >&2; exit 1; }
|
|
43
31
|
|
package/.devcontainer/ports.sh
CHANGED
|
@@ -21,12 +21,6 @@ INSTANCE="${DEVZONE_INSTANCE:-devzone}"
|
|
|
21
21
|
# shellcheck source=SCRIPTDIR/etat.sh
|
|
22
22
|
# shellcheck disable=SC1091
|
|
23
23
|
. "$ICI/etat.sh"
|
|
24
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
25
|
-
# shellcheck source=SCRIPTDIR/command-aliases.sh
|
|
26
|
-
# shellcheck disable=SC1091
|
|
27
|
-
if [ -f "$ICI/command-aliases.sh" ]; then
|
|
28
|
-
. "$ICI/command-aliases.sh"
|
|
29
|
-
fi
|
|
30
24
|
|
|
31
25
|
refuse() { echo "devzone : port : $*" >&2; exit 1; }
|
|
32
26
|
|
|
@@ -216,12 +210,6 @@ relancer() {
|
|
|
216
210
|
# shellcheck disable=SC1091
|
|
217
211
|
. "$ICI/ports-json.sh"
|
|
218
212
|
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
|
219
|
-
# Subcommand and options become their canonical English names ; the old
|
|
220
|
-
# French names warn on use (#557)
|
|
221
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
222
|
-
canonical_args port "$@"
|
|
223
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
224
|
-
fi
|
|
225
213
|
case "${1:-}" in
|
|
226
214
|
'' | list)
|
|
227
215
|
if [ "${2:-}" = "--json" ]; then liste_json; else liste; fi
|
|
@@ -25,18 +25,6 @@ ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
|
25
25
|
# shellcheck source=SCRIPTDIR/../isolement.sh
|
|
26
26
|
# shellcheck disable=SC1091
|
|
27
27
|
. "$ICI/../isolement.sh"
|
|
28
|
-
# English command names are accepted (#557) : a copied script may miss the file
|
|
29
|
-
# shellcheck source=SCRIPTDIR/../command-aliases.sh
|
|
30
|
-
# shellcheck disable=SC1091
|
|
31
|
-
if [ -f "$ICI/../command-aliases.sh" ]; then
|
|
32
|
-
. "$ICI/../command-aliases.sh"
|
|
33
|
-
fi
|
|
34
|
-
# Subcommand and options become their canonical English names ; the old
|
|
35
|
-
# French names warn on use (#557)
|
|
36
|
-
if command -v canonical_args >/dev/null 2>&1; then
|
|
37
|
-
canonical_args postgres "$@"
|
|
38
|
-
set -- "${ARGS_CANONICAL[@]+"${ARGS_CANONICAL[@]}"}"
|
|
39
|
-
fi
|
|
40
28
|
|
|
41
29
|
NS=devzone-postgres
|
|
42
30
|
SECRETS="$RACINE/workspace/.postgres"
|
|
@@ -36,7 +36,7 @@ Les modules sont désactivés par défaut, activés à la demande, sans rebuild
|
|
|
36
36
|
- `devzone repair` : relance relais Docker, gitlab, postgres, mysql, argocd, ports étiquetés et le veilleur du catalogue.
|
|
37
37
|
- `devzone status --json` : récapitulatif complet en JSON, pour les outils (aucun secret, commande à lancer par point à traiter).
|
|
38
38
|
|
|
39
|
-
Le catalogue d'applications se consulte avec `devzone catalog` ; un veilleur applique à chaud les changements de `.devzone.modules`, et `devzone repair` le relance. MySQL se pilote avec `devzone mysql create <projet>`, `devzone mysql list`, `devzone mysql delete <projet>`, `devzone mysql volume [<nom>|--
|
|
39
|
+
Le catalogue d'applications se consulte avec `devzone catalog` ; un veilleur applique à chaud les changements de `.devzone.modules`, et `devzone repair` le relance. MySQL se pilote avec `devzone mysql create <projet>`, `devzone mysql list`, `devzone mysql delete <projet>`, `devzone mysql volume [<nom>|--delete <nom>]` et `devzone mysql delete-data` (données gardées par défaut).
|
|
40
40
|
|
|
41
41
|
Le choix est propre à chaque devzone, gardé dans `.devzone.modules` du dossier devzone.
|
|
42
42
|
|
|
@@ -66,7 +66,7 @@ Un garde-fou arrête les agents qui lancent `docker` ou `docker-compose` ; `DEVZ
|
|
|
66
66
|
|
|
67
67
|
Les services (PostgreSQL, MySQL, GitLab, Argo CD) vivent sur le **cluster des services de devzone**, choisi une fois (`devzone cluster CTX`) et gardé dans l'état. Le contexte `devzone` de kubectl est posé sur ce cluster. Namespaces des services : `devzone-*`. `devzone cluster` affiche le cluster et les possibles, `devzone clusters` donne la vue travail/services ; le module `kubernetes` actif relie au cluster de la machine et installe metrics-server au démarrage.
|
|
68
68
|
|
|
69
|
-
Le poste de développement peut tourner dans le cluster : `devzone workspace
|
|
69
|
+
Le poste de développement peut tourner dans le cluster : `devzone workspace start|stop|status|shell|vscode|copy-to <dossier>|copy-from <dossier>` pilote le workspace Kubernetes (lancé du poste).
|
|
70
70
|
|
|
71
71
|
## Ce qui revient au mainteneur
|
|
72
72
|
|
package/README.md
CHANGED
|
@@ -227,7 +227,7 @@ cd mon-devzone
|
|
|
227
227
|
npx devzone@latest update
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
La commande affiche la version du dossier et celle du paquet, et ne fait rien si elles sont égales. Sinon, elle sauvegarde dans `.devzone.sauvegarde/<date>/` les fichiers remplacés ou supprimés, liste les fichiers modifiés localement et demande confirmation (`--
|
|
230
|
+
La commande affiche la version du dossier et celle du paquet, et ne fait rien si elles sont égales. Sinon, elle sauvegarde dans `.devzone.sauvegarde/<date>/` les fichiers remplacés ou supprimés, liste les fichiers modifiés localement et demande confirmation (`--yes` pour un script ; sans terminal, `--yes` est nécessaire), remplace les fichiers du paquet, retire les anciennes arborescences (`core/`, `scripts/`), complète `.gitignore` sans l'écraser, puis propose `make rebuild`. `--sans-reconstruire` saute cette proposition ; sans terminal, la reconstruction n'est jamais lancée.
|
|
231
231
|
|
|
232
232
|
`workspace/`, `.devzone.modules`, `.devzone.paquets`, `.password`, `.app`, `.devzone.log` et les volumes Docker ne sont jamais touchés.
|
|
233
233
|
|
|
@@ -432,6 +432,16 @@ npm uninstall -g devzone
|
|
|
432
432
|
|
|
433
433
|
Cette commande retire seulement la commande `devzone` de ta machine ; elle ne supprime ni conteneur, ni volume, ni dossier.
|
|
434
434
|
|
|
435
|
+
## Noms retirés
|
|
436
|
+
|
|
437
|
+
Les commandes, sous-commandes et options s'écrivent en anglais. Les anciens noms français sont retirés : devzone les refuse, affiche le nouveau nom et ne fait rien.
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
✖ « activer » a été renommé : devzone enable
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
La table complète (commandes, sous-commandes, options) est dans [la référence](manage/docs/reference.md#noms-retirés).
|
|
444
|
+
|
|
435
445
|
## Pour aller plus loin
|
|
436
446
|
|
|
437
447
|
- [Référence détaillée](https://github.com/SimBienvenueHoulBoumi/devzone/blob/main/manage/docs/reference.md)
|