devzone 1.1.0 → 2.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/Dockerfile +4 -4
- package/.devcontainer/agent-local.sh +2 -2
- package/.devcontainer/{agent-modele.messages → agent-model.messages} +1 -1
- package/.devcontainer/{agent-modele.sh → agent-model.sh} +5 -5
- package/.devcontainer/{agent-droits.sh → agent-rights.sh} +2 -2
- package/.devcontainer/agent-session.sh +1 -1
- package/.devcontainer/{agent-etat-json.sh → agent-state-json.sh} +4 -4
- package/.devcontainer/agent.sh +7 -7
- package/.devcontainer/{ia/docker-garde.sh → ai/docker-guard.sh} +1 -1
- package/.devcontainer/{ia/plugins/devzone-garde-v2.js → ai/plugins/devzone-guard-v2.js} +4 -4
- package/.devcontainer/{ia/plugins/devzone-garde.js → ai/plugins/devzone-guard.js} +3 -3
- package/.devcontainer/argocd/argocd.sh +4 -4
- package/.devcontainer/argocd/{catalogue-argocd.sh → catalog-argocd.sh} +1 -1
- package/.devcontainer/argocd/services-hook.sh +5 -5
- package/.devcontainer/{catalogue → catalog}/app.sh +3 -3
- package/.devcontainer/{catalogue/catalogue-veilleur.sh → catalog/catalog-watcher.sh} +5 -5
- package/.devcontainer/{catalogue → catalog}/mysql/mysql.sh +6 -6
- package/.devcontainer/{catalogue.sh → catalog.sh} +10 -10
- package/.devcontainer/cluster.sh +7 -7
- package/.devcontainer/devcontainer.json +1 -1
- package/.devcontainer/devzone +41 -41
- package/.devcontainer/{docker-relais.sh → docker-relay.sh} +2 -2
- package/.devcontainer/gitlab/argocd.sh +2 -2
- package/.devcontainer/gitlab/gitlab.sh +3 -3
- package/.devcontainer/gitlab/installation.sh +2 -2
- package/.devcontainer/{kind-enveloppe.sh → kind-wrapper.sh} +5 -5
- package/.devcontainer/{kube-compte.sh → kube-account.sh} +3 -3
- package/.devcontainer/{kube-joignable.sh → kube-reachable.sh} +1 -1
- package/.devcontainer/{paquets.sh → packages.sh} +4 -4
- package/.devcontainer/ports-auto.sh +1 -1
- package/.devcontainer/ports.sh +3 -3
- package/.devcontainer/post-create.sh +2 -2
- package/.devcontainer/postgres/postgres.sh +2 -2
- package/.devcontainer/services-admin.sh +2 -2
- package/.devcontainer/skills/devzone/SKILL.md +1 -1
- package/.devcontainer/{demarrage.sh → startup.sh} +5 -5
- package/.devcontainer/{etat-json.sh → state-json.sh} +4 -4
- package/.devcontainer/{etat-verrou.sh → state-lock.sh} +1 -1
- package/.devcontainer/{etat.sh → state.sh} +2 -2
- package/.devcontainer/workspace-init.sh +1 -1
- package/Makefile +7 -7
- package/manage/devzone +3 -3
- package/manage/scripts/check-go-layout.sh +40 -0
- package/manage/scripts/check-names.sh +60 -0
- package/manage/scripts/devzone-create.sh +2 -2
- package/manage/scripts/devzone-manifest.sh +2 -2
- package/manage/scripts/docker-workstation.sh +2 -2
- package/manage/scripts/docker.sh +2 -2
- package/manage/scripts/{lancer.sh → launch.sh} +3 -3
- package/manage/scripts/{migrer-retour.sh → migrate-revert.sh} +1 -1
- package/manage/scripts/{migrer.sh → migrate.sh} +1 -1
- package/manage/workspace.sh +4 -4
- package/package.json +1 -1
- /package/.devcontainer/{agent-erreurs.sh → agent-errors.sh} +0 -0
- /package/.devcontainer/{ia/docker-garde.message → ai/docker-guard.message} +0 -0
- /package/.devcontainer/{ia → ai}/host-check.message +0 -0
- /package/.devcontainer/{ia → ai}/host-check.sh +0 -0
- /package/.devcontainer/{ia → ai}/host-models.sh +0 -0
- /package/.devcontainer/{catalogue → catalog}/mysql/app.conf +0 -0
- /package/.devcontainer/{catalogue/mysql/installer.sh → catalog/mysql/install.sh} +0 -0
- /package/.devcontainer/{catalogue → catalog}/mysql/volume.sh +0 -0
- /package/.devcontainer/{docker-sans-hote.sh → docker-without-host.sh} +0 -0
- /package/.devcontainer/{isolement.sh → isolation.sh} +0 -0
- /package/.devcontainer/{memoire.sh → memory.sh} +0 -0
- /package/.devcontainer/{etat-gitops.sh → state-gitops.sh} +0 -0
- /package/manage/scripts/{desinstaller.sh → uninstall.sh} +0 -0
package/manage/devzone
CHANGED
|
@@ -109,16 +109,16 @@ case "${1:-}" in
|
|
|
109
109
|
update_workstation "${@:2}"
|
|
110
110
|
;;
|
|
111
111
|
uninstall)
|
|
112
|
-
# Devzone folder (.devcontainer/); an older devzone has its
|
|
112
|
+
# Devzone folder (.devcontainer/); an older devzone has its uninstall.sh
|
|
113
113
|
# in manage/scripts/ (new), core/scripts or scripts/ (old), or at the root
|
|
114
114
|
uninstaller=""
|
|
115
115
|
if [ -d .devcontainer ]; then
|
|
116
|
-
for f in manage/scripts/
|
|
116
|
+
for f in manage/scripts/uninstall.sh core/scripts/uninstall.sh scripts/uninstall.sh uninstall.sh; do
|
|
117
117
|
if [ -f "$f" ]; then uninstaller="$f" && break; fi
|
|
118
118
|
done
|
|
119
119
|
fi
|
|
120
120
|
if [ -z "$uninstaller" ]; then
|
|
121
|
-
echo "✖ À lancer dans un dossier devzone (
|
|
121
|
+
echo "✖ À lancer dans un dossier devzone (uninstall.sh introuvable ici)." >&2
|
|
122
122
|
exit 1
|
|
123
123
|
fi
|
|
124
124
|
DEVZONE_COMMANDE="devzone uninstall" bash "$uninstaller"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# CI check: every Go file has at most 250 lines, tests included (#710). A file
|
|
3
|
+
# that grows beyond it is split into a folder of smaller files, by
|
|
4
|
+
# responsibility. Checked: the Go files tracked by git, plus the new ones not
|
|
5
|
+
# ignored (git ls-files --cached --others --exclude-standard), so the Go
|
|
6
|
+
# projects checked out under workspace/ are never counted. A file too long is
|
|
7
|
+
# printed as "path: N lines (max 250)" and the run exits 1; otherwise it prints
|
|
8
|
+
# "go layout: N files ok" and exits 0. bash 3.2 (macOS).
|
|
9
|
+
|
|
10
|
+
set -u
|
|
11
|
+
|
|
12
|
+
ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
13
|
+
ROOT="$(cd "$ICI/../.." && pwd)"
|
|
14
|
+
MAX=250
|
|
15
|
+
|
|
16
|
+
if ! files="$(git -C "$ROOT" ls-files --cached --others --exclude-standard -- '*.go')"; then
|
|
17
|
+
echo "check-go-layout: git ls-files fails in $ROOT" >&2
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
fails=0
|
|
22
|
+
count=0
|
|
23
|
+
while IFS= read -r f; do
|
|
24
|
+
[ -n "$f" ] || continue
|
|
25
|
+
[ -f "$ROOT/$f" ] || continue
|
|
26
|
+
count=$((count + 1))
|
|
27
|
+
# awk counts the last line too, even without a final newline
|
|
28
|
+
lines="$(awk 'END { print NR }' "$ROOT/$f")"
|
|
29
|
+
if [ "$lines" -gt "$MAX" ]; then
|
|
30
|
+
printf '%s: %s lines (max %s)\n' "$f" "$lines" "$MAX"
|
|
31
|
+
fails=1
|
|
32
|
+
fi
|
|
33
|
+
done <<LISTE
|
|
34
|
+
$files
|
|
35
|
+
LISTE
|
|
36
|
+
|
|
37
|
+
if [ "$fails" -ne 0 ]; then
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
echo "go layout: $count files ok"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# CI check: the names of the files and folders tracked by git are in English
|
|
3
|
+
# (#716). A path fails when one of its words (split on - . _ and /) is in the
|
|
4
|
+
# list of French words below. Each fault is printed as "path: word" and the
|
|
5
|
+
# run exits 1; otherwise it prints "names check: N paths ok" and exits 0.
|
|
6
|
+
# Not checked: .github/ (the workflow names are referenced by the repowarden
|
|
7
|
+
# checks) and the names listed in ALLOWED (files of the user data, kept until
|
|
8
|
+
# their migration). bash 3.2 (macOS).
|
|
9
|
+
|
|
10
|
+
set -u
|
|
11
|
+
|
|
12
|
+
ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
13
|
+
ROOT="$(cd "$ICI/../.." && pwd)"
|
|
14
|
+
|
|
15
|
+
# French words that must not appear in a name. Split fragments, so this file
|
|
16
|
+
# does not match its own rules (the check-english convention).
|
|
17
|
+
FRENCH=" cre_er desinst_aller migr_er ret_our et_at demarr_age catalog_ue paqu_ets plate_forme memo_ire rel_ais verr_ou veill_eur dro_its err_eurs mod_ele mod_eles ec_arts chem_ins para_llele ho_te san_s ave_c envel_oppe join_gnable isole_ment comp_te lan_cer rep_arer util_iser garde_ mett_re "
|
|
18
|
+
FRENCH="$(printf '%s' "$FRENCH" | tr -d '_')"
|
|
19
|
+
|
|
20
|
+
# Names of the user data, handled by their own migration ticket
|
|
21
|
+
ALLOWED=" .devzone.paquets .devzone.sauvegarde .devzone.ports-workspace .devzone.modules .devzone.version "
|
|
22
|
+
|
|
23
|
+
if ! paths="$(git -C "$ROOT" ls-files --cached --others --exclude-standard)"; then
|
|
24
|
+
echo "check-names: git ls-files fails in $ROOT" >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
fails=0
|
|
29
|
+
count=0
|
|
30
|
+
while IFS= read -r path; do
|
|
31
|
+
[ -n "$path" ] || continue
|
|
32
|
+
case "$path" in
|
|
33
|
+
.github/*) continue ;;
|
|
34
|
+
esac
|
|
35
|
+
count=$((count + 1))
|
|
36
|
+
words="$(printf '%s' "$path" | tr '/._-' ' ')"
|
|
37
|
+
for word in $words; do
|
|
38
|
+
case "$FRENCH" in
|
|
39
|
+
*" $word "*)
|
|
40
|
+
skip=0
|
|
41
|
+
for allowed in $ALLOWED; do
|
|
42
|
+
case "$path" in
|
|
43
|
+
"$allowed" | "$allowed"/*) skip=1 ;;
|
|
44
|
+
esac
|
|
45
|
+
done
|
|
46
|
+
if [ "$skip" -eq 0 ]; then
|
|
47
|
+
printf '%s: %s\n' "$path" "$word"
|
|
48
|
+
fails=1
|
|
49
|
+
fi
|
|
50
|
+
;;
|
|
51
|
+
esac
|
|
52
|
+
done
|
|
53
|
+
done <<LISTE
|
|
54
|
+
$paths
|
|
55
|
+
LISTE
|
|
56
|
+
|
|
57
|
+
if [ "$fails" -ne 0 ]; then
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
echo "names check: $count paths ok"
|
|
@@ -72,7 +72,7 @@ create_workstation() {
|
|
|
72
72
|
# npm never includes .gitignore: written here
|
|
73
73
|
: >"$target/.gitignore"
|
|
74
74
|
complete_gitignore "$target"
|
|
75
|
-
chmod +x "$target/manage/scripts/
|
|
75
|
+
chmod +x "$target/manage/scripts/uninstall.sh" "$target/manage/scripts/launch.sh"
|
|
76
76
|
create_mode_write "$target" "$CREATE_MODE"
|
|
77
77
|
# The GitOps repository of the new devzone (#539): github, an existing URL,
|
|
78
78
|
# or none, written in the .argocd.conf of the new devzone (conf.sh writes
|
|
@@ -132,7 +132,7 @@ create_workstation() {
|
|
|
132
132
|
if command -v make >/dev/null 2>&1; then
|
|
133
133
|
make -C "$target" up
|
|
134
134
|
else
|
|
135
|
-
bash "$target/manage/scripts/
|
|
135
|
+
bash "$target/manage/scripts/launch.sh" up "$target"
|
|
136
136
|
fi
|
|
137
137
|
echo "Ensuite : cd $target && make shell (ou ouvre le dossier dans VS Code : Reopen in Container)."
|
|
138
138
|
}
|
|
@@ -139,10 +139,10 @@ old_tree() {
|
|
|
139
139
|
local folder="$1" tree="$2"
|
|
140
140
|
case "$tree" in
|
|
141
141
|
core)
|
|
142
|
-
[ -f "$folder/core/devzone" ] || [ -f "$folder/core/scripts/
|
|
142
|
+
[ -f "$folder/core/devzone" ] || [ -f "$folder/core/scripts/uninstall.sh" ]
|
|
143
143
|
;;
|
|
144
144
|
scripts)
|
|
145
|
-
[ -f "$folder/scripts/
|
|
145
|
+
[ -f "$folder/scripts/uninstall.sh" ] && [ -f "$folder/scripts/launch.sh" ]
|
|
146
146
|
;;
|
|
147
147
|
*) return 1 ;;
|
|
148
148
|
esac
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Docker workstation put to sleep when the Kubernetes workspace takes over (#517).
|
|
3
|
-
# Sourced by
|
|
3
|
+
# Sourced by migrate.sh (stop) and migrate-revert.sh (start). Containers of the
|
|
4
4
|
# workstation folder (label devcontainer.local_folder) and the automatic port
|
|
5
5
|
# relays of this instance (labels devzone.auto=true, devzone.instance) are
|
|
6
6
|
# stopped, never removed. Without Docker,
|
|
@@ -12,7 +12,7 @@ docker_workstation_ready() {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
# Ids, one per line, of the containers of folder $1 and of the automatic relays
|
|
15
|
-
# of this instance (DEVZONE_VOLUMES, default devzone, as in
|
|
15
|
+
# of this instance (DEVZONE_VOLUMES, default devzone, as in uninstall.sh): the
|
|
16
16
|
# relays of another devzone on the same machine are not touched.
|
|
17
17
|
# $2 is "running" (docker ps) or "exited" (stopped containers, docker ps -a).
|
|
18
18
|
docker_workstation_ids() {
|
package/manage/scripts/docker.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Checks Docker on the host before any call (sourced by
|
|
3
|
-
#
|
|
2
|
+
# Checks Docker on the host before any call (sourced by launch.sh,
|
|
3
|
+
# uninstall.sh and the npm command manage/devzone): without it the user
|
|
4
4
|
# would only see the raw devcontainers CLI or docker error.
|
|
5
5
|
# DEVZONE_DOCKER: docker command name (tests: simulate its absence).
|
|
6
6
|
# Compatible with bash 3.2 (macOS).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Starts the container on the host without ever staying silent:
|
|
3
|
-
# bash manage/scripts/
|
|
4
|
-
# bash manage/scripts/
|
|
3
|
+
# bash manage/scripts/launch.sh up [folder] (make up)
|
|
4
|
+
# bash manage/scripts/launch.sh rebuild [folder] (make rebuild: rebuild from scratch)
|
|
5
5
|
# Full devcontainer CLI output goes to <folder>/.devzone.log; the terminal shows
|
|
6
6
|
# key steps, a heartbeat at least every DEVZONE_SIGNE_DE_VIE seconds (30), and a
|
|
7
7
|
# question asked inside the container (last log line left unanswered for
|
|
@@ -16,7 +16,7 @@ case "$mode" in
|
|
|
16
16
|
up) options=() done_msg="devzone started" ;;
|
|
17
17
|
rebuild) options=(--remove-existing-container) done_msg="devzone rebuilt" ;;
|
|
18
18
|
*)
|
|
19
|
-
echo "usage: bash manage/scripts/
|
|
19
|
+
echo "usage: bash manage/scripts/launch.sh up|rebuild [folder]" >&2
|
|
20
20
|
exit 2
|
|
21
21
|
;;
|
|
22
22
|
esac
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Rollback from Kubernetes workspace to Docker workstation (#403): devzone workspace
|
|
3
|
-
# revert [--bring-back]. Sourced by manage/workspace.sh after
|
|
3
|
+
# revert [--bring-back]. Sourced by manage/workspace.sh after migrate.sh (uses
|
|
4
4
|
# copy_from, record_workspace, fail and kc). With --bring-back, the workstation
|
|
5
5
|
# version of a project is moved to .devzone.sauvegarde/<date>/ before being replaced.
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# kubectl_flag, copy_to and copy_from. Nothing is ever deleted except by
|
|
5
5
|
# clean-docker, after confirmation. Run from the devzone workstation folder.
|
|
6
6
|
|
|
7
|
-
# Docker workstation sleep on migrate (stop here, start in
|
|
7
|
+
# Docker workstation sleep on migrate (stop here, start in migrate-revert.sh).
|
|
8
8
|
# shellcheck source=manage/scripts/docker-workstation.sh
|
|
9
9
|
. "$(dirname "${BASH_SOURCE[0]}")/docker-workstation.sh"
|
|
10
10
|
|
package/manage/workspace.sh
CHANGED
|
@@ -175,10 +175,10 @@ copy_from() {
|
|
|
175
175
|
. "$HERE/scripts/workspace-clone.sh"
|
|
176
176
|
# shellcheck source=manage/scripts/workspace-copies.sh
|
|
177
177
|
. "$HERE/scripts/workspace-copies.sh"
|
|
178
|
-
# shellcheck source=manage/scripts/
|
|
179
|
-
. "$HERE/scripts/
|
|
180
|
-
# shellcheck source=manage/scripts/
|
|
181
|
-
. "$HERE/scripts/
|
|
178
|
+
# shellcheck source=manage/scripts/migrate.sh
|
|
179
|
+
. "$HERE/scripts/migrate.sh"
|
|
180
|
+
# shellcheck source=manage/scripts/migrate-revert.sh
|
|
181
|
+
. "$HERE/scripts/migrate-revert.sh"
|
|
182
182
|
# shellcheck source=manage/scripts/ports-workspace.sh
|
|
183
183
|
. "$HERE/scripts/ports-workspace.sh"
|
|
184
184
|
# shellcheck source=manage/scripts/services-workspace.sh
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|