devzone 7.1.1 → 7.3.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 +14 -14
- package/.devcontainer/ai/host-check.message +12 -12
- package/.devcontainer/ai/host-check.sh +1 -1
- package/.devcontainer/catalog/catalog-watcher.sh +9 -12
- package/.devcontainer/catalog.sh +5 -28
- package/.devcontainer/cluster.sh +1 -4
- package/.devcontainer/devzone +27 -25
- package/.devcontainer/devzone-ai.sh +1 -1
- package/.devcontainer/devzone-cluster.sh +1 -2
- package/.devcontainer/devzone-modules.sh +9 -20
- package/.devcontainer/devzone-repair.sh +3 -3
- package/.devcontainer/devzone-services.sh +2 -2
- package/.devcontainer/devzone-status.sh +1 -1
- package/.devcontainer/gitlab/demo/.gitlab-ci.yml +1 -1
- package/.devcontainer/help.sh +0 -1
- package/.devcontainer/packages.sh +1 -1
- package/.devcontainer/password.sh +5 -6
- package/.devcontainer/ports.sh +3 -6
- package/.devcontainer/services-admin.sh +5 -8
- package/.devcontainer/workspace-init.sh +0 -7
- package/Makefile +3 -3
- package/README.md +1 -13
- package/bin/SHA256SUMS +6 -6
- package/bin/devzone-darwin-amd64 +0 -0
- package/bin/devzone-darwin-arm64 +0 -0
- package/bin/devzone-linux-amd64 +0 -0
- package/bin/devzone-linux-arm64 +0 -0
- package/bin/devzone-windows-amd64.exe +0 -0
- package/bin/devzone-windows-arm64.exe +0 -0
- package/manage/devzone +6 -17
- package/manage/scripts/ci/check-names.sh +5 -6
- package/manage/scripts/ci/ticket-protocol.txt +7 -0
- package/manage/scripts/ci/versions-tools-plan.sh +1 -1
- package/manage/scripts/devzone-create.sh +4 -4
- package/manage/scripts/devzone-update.sh +18 -22
- package/manage/scripts/workspace/argocd-services.sh +1 -1
- package/manage/scripts/workspace/argocd-workspace.sh +2 -2
- package/manage/scripts/workspace/ports-workspace.sh +5 -5
- package/manage/scripts/workspace/services-workspace.sh +3 -3
- package/manage/scripts/workspace/workspace-update.sh +0 -3
- package/manage/workspace.sh +0 -14
- package/package.json +1 -1
- package/.devcontainer/command-aliases.sh +0 -234
- package/.devcontainer/rename-legacy-files.sh +0 -172
- package/.devcontainer/rename-legacy-ports.sh +0 -119
- package/.devcontainer/state-gitops.sh +0 -23
- package/.devcontainer/state-json.sh +0 -282
- package/.devcontainer/state-lock.sh +0 -53
- package/.devcontainer/state.sh +0 -219
- package/manage/scripts/ci/check-english.sh +0 -57
package/README.md
CHANGED
|
@@ -228,8 +228,6 @@ The command shows the folder's version and the package's, and does nothing if th
|
|
|
228
228
|
|
|
229
229
|
`workspace/`, `.devzone.modules`, `.devzone.packages`, `.password`, `.app`, `.devzone.log` and the Docker volumes are never touched.
|
|
230
230
|
|
|
231
|
-
The old names of files and folders (`.devzone.paquets`, `.devzone.sauvegarde`, `.devzone.ports-workspace`, `.devzone.etat`, `.devzone.catalogue-veilleur`) are renamed once only, with their contents, by `.devcontainer/rename-legacy-files.sh`: at container startup and at update. A new name already present is never overwritten.
|
|
232
|
-
|
|
233
231
|
The Kubernetes workspace is updated separately: `devzone workspace update` moves it to the latest stable release (or `--version X.Y.Z`), image, charts and Argo CD at the same tag. **The pod `devzone-workspace-0` is recreated**: the VS Code windows attached to the pod are disconnected. The image is checked on ghcr.io before any write, and nothing changes if it does not exist yet. Details in the [reference](manage/docs/reference.md#updating-the-workspace).
|
|
234
232
|
|
|
235
233
|
In the workspace pod, the `devzone` summary reports a more recent published version (npm check at most once a day, without blocking offline): `○ devzone X.Y.Z disponible : sur le poste, devzone update`.
|
|
@@ -254,7 +252,7 @@ In the workspace pod, the `devzone` summary reports a more recent published vers
|
|
|
254
252
|
|
|
255
253
|
These modules are disabled by default, can be enabled on demand from the container (without a rebuild), and their choice is kept from one startup to the next.
|
|
256
254
|
|
|
257
|
-
The `devzone` command is written in English, subcommands and options included (`enable`, `disable`, `platform`, `packages`, `update`, `uninstall`, `status`, `use`; `postgres create`, `packages add`, `gitlab new-password`, `port --close`, `cluster --yes`).
|
|
255
|
+
The `devzone` command is written in English, subcommands and options included (`enable`, `disable`, `platform`, `packages`, `update`, `uninstall`, `status`, `use`; `postgres create`, `packages add`, `gitlab new-password`, `port --close`, `cluster --yes`).
|
|
258
256
|
|
|
259
257
|
## Where are my credentials?
|
|
260
258
|
|
|
@@ -422,16 +420,6 @@ To remove the `devzone` command from your machine:
|
|
|
422
420
|
npm uninstall -g devzone
|
|
423
421
|
```
|
|
424
422
|
|
|
425
|
-
## Removed names
|
|
426
|
-
|
|
427
|
-
Commands, subcommands and options are written in English. The old French names are removed: devzone refuses them, shows the new name and does nothing.
|
|
428
|
-
|
|
429
|
-
```
|
|
430
|
-
✖ « activer » was renamed: devzone enable
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
The full table (commands, subcommands, options) is in [the reference](manage/docs/reference.md#removed-names).
|
|
434
|
-
|
|
435
423
|
## Going further
|
|
436
424
|
|
|
437
425
|
- [Detailed reference](https://github.com/SimBienvenueHoulBoumi/devzone/blob/main/manage/docs/reference.md)
|
package/bin/SHA256SUMS
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
e6babceeed9fcd0bfbfbde50e16e3ae6713c47383383a5e8842a6aa198c7c67b devzone-linux-amd64
|
|
2
|
+
9bb7cdffbbb897b757d123faca2ca3caf77568162a5f63b7e2d76713814946e6 devzone-linux-arm64
|
|
3
|
+
b3c4f85f0f1366083418c88f76ed74d6afd4cb26bc0d2203e48ee2f94a2b5279 devzone-darwin-amd64
|
|
4
|
+
bb5e358f993f44cd6540155edc26c8176e3de66e1911f91e47ae5bbe3279d269 devzone-darwin-arm64
|
|
5
|
+
29c33aee6503737830218008995b90a9bfac6147ed9e7137ae42214a2474c116 devzone-windows-amd64.exe
|
|
6
|
+
8adfaf2cb97d721213589497c24f37f81d3485799dc5e8eca8aef4a244ac50e0 devzone-windows-arm64.exe
|
package/bin/devzone-darwin-amd64
CHANGED
|
Binary file
|
package/bin/devzone-darwin-arm64
CHANGED
|
Binary file
|
package/bin/devzone-linux-amd64
CHANGED
|
Binary file
|
package/bin/devzone-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/manage/devzone
CHANGED
|
@@ -26,7 +26,7 @@ PAQUET="$(cd "$(dirname "$(readlink -f "$SCRIPT" 2>/dev/null || echo "$SCRIPT")"
|
|
|
26
26
|
PACKAGE_ITEMS=(.devcontainer Makefile .gitattributes README.md LICENSE)
|
|
27
27
|
# Lines always present in the .gitignore of a devzone: added to, never overwritten
|
|
28
28
|
GITIGNORE_LINES=(
|
|
29
|
-
'#
|
|
29
|
+
'# Each workspace project has its own git repository'
|
|
30
30
|
'workspace/*'
|
|
31
31
|
'!workspace/.gitkeep'
|
|
32
32
|
'.DS_Store'
|
|
@@ -171,9 +171,10 @@ devzone $(version): development workspace in a Kubernetes cluster
|
|
|
171
171
|
(start installs it, stop removes it from the cluster)
|
|
172
172
|
devzone workspace services enable|disable <service>|status
|
|
173
173
|
services (gitlab, postgres, argocd) of the Kubernetes workspace
|
|
174
|
+
devzone workspace ports enable|disable
|
|
175
|
+
automatic start of the port watcher on the workstation
|
|
174
176
|
devzone workspace argocd status|init|apply|app add|list|remove
|
|
175
177
|
Argo CD of the workspace: GitOps repository, .argocd.conf, projects
|
|
176
|
-
(old French names: refused with the new name, see the README, « Removed names »)
|
|
177
178
|
devzone --version
|
|
178
179
|
EOT
|
|
179
180
|
}
|
|
@@ -184,7 +185,7 @@ container_command() {
|
|
|
184
185
|
case "$1" in
|
|
185
186
|
ai | agent | apply | argocd | build | catalog | cluster | clusters | disable | \
|
|
186
187
|
enable | gitlab | is-enabled | llm | metrics | modules | mysql | packages | \
|
|
187
|
-
passwords | platform | port | postgres | repair | start | status | \
|
|
188
|
+
passwords | platform | port | postgres | repair | start | state | status | \
|
|
188
189
|
test-bash32 | test-gitlab | ticket | use) return 0 ;;
|
|
189
190
|
*) return 1 ;;
|
|
190
191
|
esac
|
|
@@ -192,18 +193,6 @@ container_command() {
|
|
|
192
193
|
|
|
193
194
|
go_launch "$@"
|
|
194
195
|
|
|
195
|
-
# Renamed names (#695): the French names of the host and container commands are
|
|
196
|
-
# refused before anything is created (« devzone mettre-a-jour » must not create a
|
|
197
|
-
# folder; « devzone stop » still creates ./stop). A copied devzone may miss the
|
|
198
|
-
# aliases file: then no check.
|
|
199
|
-
# shellcheck source=SCRIPTDIR/../.devcontainer/command-aliases.sh
|
|
200
|
-
# shellcheck disable=SC1091
|
|
201
|
-
if [ -f "$PAQUET/.devcontainer/command-aliases.sh" ]; then
|
|
202
|
-
. "$PAQUET/.devcontainer/command-aliases.sh"
|
|
203
|
-
reject_renamed "$@" || exit 1
|
|
204
|
-
fi
|
|
205
|
-
|
|
206
|
-
|
|
207
196
|
case "${1:-}" in
|
|
208
197
|
"" | -h | --help | help) show_help ;;
|
|
209
198
|
-v | --version) version ;;
|
|
@@ -224,7 +213,7 @@ case "${1:-}" in
|
|
|
224
213
|
done
|
|
225
214
|
fi
|
|
226
215
|
if [ -z "$uninstaller" ]; then
|
|
227
|
-
echo "✖
|
|
216
|
+
echo "✖ Run this in a devzone folder (uninstall.sh not found here)." >&2
|
|
228
217
|
exit 1
|
|
229
218
|
fi
|
|
230
219
|
DEVZONE_COMMAND="devzone uninstall" bash "$uninstaller"
|
|
@@ -238,7 +227,7 @@ case "${1:-}" in
|
|
|
238
227
|
;;
|
|
239
228
|
*)
|
|
240
229
|
if container_command "$1"; then
|
|
241
|
-
echo "✖ devzone $1
|
|
230
|
+
echo "✖ devzone $1: pod command; run it in the pod (make shell), or choose another folder name" >&2
|
|
242
231
|
exit 2
|
|
243
232
|
fi
|
|
244
233
|
# shellcheck source=SCRIPTDIR/scripts/devzone-manifest.sh
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
# list of French words below. Each fault is printed as "path: word" and the
|
|
5
5
|
# run exits 1; otherwise it prints "names check: N paths ok" and exits 0.
|
|
6
6
|
# Not checked: .github/ (the workflow names are referenced by the repowarden
|
|
7
|
-
# checks) and the names listed in ALLOWED (user data kept under its name
|
|
8
|
-
#
|
|
7
|
+
# checks) and the names listed in ALLOWED (user data kept under its name).
|
|
8
|
+
# bash 3.2 (macOS).
|
|
9
9
|
|
|
10
10
|
set -u
|
|
11
11
|
|
|
@@ -13,13 +13,12 @@ ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
13
13
|
ROOT="$(cd "$ICI/../../.." && pwd)"
|
|
14
14
|
|
|
15
15
|
# French words that must not appear in a name. Split fragments, so this file
|
|
16
|
-
# does not match its own rules (the check
|
|
16
|
+
# does not match its own rules (as in the English code check).
|
|
17
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 identi_te invi_te "
|
|
18
18
|
FRENCH="$(printf '%s' "$FRENCH" | tr -d '_')"
|
|
19
19
|
|
|
20
|
-
# Names of the user data kept as they are
|
|
21
|
-
|
|
22
|
-
ALLOWED=" .devzone.modules .devzone.version .devcontainer/rename-legacy-files.sh "
|
|
20
|
+
# Names of the user data kept as they are
|
|
21
|
+
ALLOWED=" .devzone.modules .devzone.version "
|
|
23
22
|
|
|
24
23
|
if ! paths="$(git -C "$ROOT" ls-files --cached --others --exclude-standard)"; then
|
|
25
24
|
echo "check-names: git ls-files fails in $ROOT" >&2
|
|
@@ -45,7 +45,7 @@ notes_of() {
|
|
|
45
45
|
|
|
46
46
|
# Title of the ticket and of the commit for the bump of tool $1 from $2 to $3
|
|
47
47
|
title_of() {
|
|
48
|
-
echo "$1 $2 → $3
|
|
48
|
+
echo "$1 $2 → $3 in the image"
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
# "number<TAB>title" of the open ticket of AUTHOR for tool $1, nothing otherwise
|
|
@@ -33,16 +33,16 @@ create_workstation() {
|
|
|
33
33
|
--gitops) expect=gitops ;;
|
|
34
34
|
--gitops=*) gitops="${arg#--gitops=}" ;;
|
|
35
35
|
--kubernetes) option=kubernetes ;;
|
|
36
|
-
*) echo "✖ option
|
|
36
|
+
*) echo "✖ unknown option: $arg (devzone <folder> [--gitops github|none|<url>] [--kubernetes])" >&2; exit 1 ;;
|
|
37
37
|
esac
|
|
38
38
|
done
|
|
39
39
|
if [ -n "$expect" ]; then
|
|
40
|
-
echo "✖ --gitops
|
|
40
|
+
echo "✖ --gitops expects a value (github, none or a URL)" >&2
|
|
41
41
|
exit 1
|
|
42
42
|
fi
|
|
43
43
|
|
|
44
44
|
if [ -e "$target" ] && [ -n "$(ls -A "$target" 2>/dev/null)" ]; then
|
|
45
|
-
echo "✖ $target
|
|
45
|
+
echo "✖ $target exists and is not empty: nothing is overwritten. Choose another folder." >&2
|
|
46
46
|
exit 1
|
|
47
47
|
fi
|
|
48
48
|
|
|
@@ -104,7 +104,7 @@ create_workstation() {
|
|
|
104
104
|
esac
|
|
105
105
|
target="$(cd "$target" && pwd)"
|
|
106
106
|
write_manifest "$target"
|
|
107
|
-
echo "✔ devzone $(version)
|
|
107
|
+
echo "✔ devzone $(version) created in $target"
|
|
108
108
|
# The workspace goes to the cluster (kube check done by create_mode_choose)
|
|
109
109
|
create_mode_start "$target" "$PAQUET/manage/workspace.sh"
|
|
110
110
|
}
|
|
@@ -35,7 +35,7 @@ update_workstation() {
|
|
|
35
35
|
esac
|
|
36
36
|
done
|
|
37
37
|
if [ ! -d .devcontainer ]; then
|
|
38
|
-
echo "✖
|
|
38
|
+
echo "✖ Run this in a devzone folder (.devcontainer not found here)." >&2
|
|
39
39
|
exit 1
|
|
40
40
|
fi
|
|
41
41
|
|
|
@@ -55,11 +55,11 @@ update_workstation() {
|
|
|
55
55
|
[ -f "$folder/$rel" ] || missing=1
|
|
56
56
|
done <"$package_list"
|
|
57
57
|
if [ "$installed" = "$package" ] && [ -z "$missing" ]; then
|
|
58
|
-
echo "✔ devzone $installed
|
|
59
|
-
echo "
|
|
58
|
+
echo "✔ devzone $installed: already up to date."
|
|
59
|
+
echo "For the latest published version: npx devzone@latest update"
|
|
60
60
|
return 0
|
|
61
61
|
fi
|
|
62
|
-
echo "devzone
|
|
62
|
+
echo "devzone: folder $installed, package $package"
|
|
63
63
|
|
|
64
64
|
# 2. Files modified locally (checksum different from the manifest; without
|
|
65
65
|
# a manifest, different from the one of the package)
|
|
@@ -81,13 +81,13 @@ update_workstation() {
|
|
|
81
81
|
while IFS= read -r rel; do
|
|
82
82
|
[ -n "$rel" ] || continue
|
|
83
83
|
if ! path_allowed "$rel"; then
|
|
84
|
-
echo "devzone
|
|
84
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
85
85
|
continue
|
|
86
86
|
fi
|
|
87
87
|
in_list "$package_list" "$rel" && continue
|
|
88
88
|
is_protected "$rel" && continue
|
|
89
89
|
if ! inside_folder "$folder" "$rel"; then
|
|
90
|
-
echo "devzone
|
|
90
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
91
91
|
continue
|
|
92
92
|
fi
|
|
93
93
|
printf '%s\n' "$rel" >>"$work/to_remove"
|
|
@@ -106,7 +106,7 @@ update_workstation() {
|
|
|
106
106
|
while IFS= read -r f; do
|
|
107
107
|
rel="${f#"$folder"/}"
|
|
108
108
|
if ! path_allowed "$rel"; then
|
|
109
|
-
echo "devzone
|
|
109
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
110
110
|
continue
|
|
111
111
|
fi
|
|
112
112
|
is_protected "$rel" && continue
|
|
@@ -125,13 +125,13 @@ update_workstation() {
|
|
|
125
125
|
mv "$work/to_save.sorted" "$work/to_save"
|
|
126
126
|
|
|
127
127
|
if [ -s "$work/modified" ]; then
|
|
128
|
-
echo "
|
|
128
|
+
echo "Locally modified files:"
|
|
129
129
|
while IFS= read -r rel; do
|
|
130
130
|
printf ' %s\n' "$rel"
|
|
131
131
|
done <"$work/modified"
|
|
132
132
|
if [ -z "$assume_yes" ]; then
|
|
133
133
|
if [ ! -t 0 ]; then
|
|
134
|
-
echo "✖
|
|
134
|
+
echo "✖ Locally modified files: rerun with --yes to replace them (backup in .devzone.backup/)." >&2
|
|
135
135
|
exit 1
|
|
136
136
|
fi
|
|
137
137
|
printf 'Replace these files (backup in .devzone.backup/)? [y/N] ' >&2
|
|
@@ -139,17 +139,13 @@ update_workstation() {
|
|
|
139
139
|
case "$answer" in
|
|
140
140
|
y | Y | yes) ;;
|
|
141
141
|
*)
|
|
142
|
-
echo "
|
|
142
|
+
echo "Aborted: nothing was modified."
|
|
143
143
|
return 1
|
|
144
144
|
;;
|
|
145
145
|
esac
|
|
146
146
|
fi
|
|
147
147
|
fi
|
|
148
148
|
|
|
149
|
-
# Former French names renamed before the backup (#733): the backup folder is
|
|
150
|
-
# .devzone.backup. The script comes from the package, the folder may be old
|
|
151
|
-
DEVZONE_ROOT="$folder" bash "$PAQUET/.devcontainer/rename-legacy-files.sh" || true
|
|
152
|
-
|
|
153
149
|
# 3. Backup of every file replaced or removed
|
|
154
150
|
if [ -s "$work/to_save" ]; then
|
|
155
151
|
base="$folder/.devzone.backup/$(date +%Y%m%d-%H%M%S)"
|
|
@@ -162,7 +158,7 @@ update_workstation() {
|
|
|
162
158
|
while IFS= read -r rel; do
|
|
163
159
|
[ -f "$folder/$rel" ] || continue
|
|
164
160
|
if ! inside_folder "$folder" "$rel"; then
|
|
165
|
-
echo "devzone
|
|
161
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
166
162
|
continue
|
|
167
163
|
fi
|
|
168
164
|
mkdir -p "$backup/$(dirname "$rel")"
|
|
@@ -178,13 +174,13 @@ update_workstation() {
|
|
|
178
174
|
while IFS= read -r rel; do
|
|
179
175
|
mkdir -p "$folder/$(dirname "$rel")"
|
|
180
176
|
if ! inside_folder "$folder" "$rel"; then
|
|
181
|
-
echo "devzone
|
|
177
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
182
178
|
continue
|
|
183
179
|
fi
|
|
184
180
|
# Never write through a link: the link (not its target) is removed
|
|
185
181
|
if [ -L "$folder/$rel" ]; then
|
|
186
182
|
rm -f -- "$folder/$rel"
|
|
187
|
-
echo "devzone
|
|
183
|
+
echo "devzone: manifest: link replaced: $rel" >&2
|
|
188
184
|
fi
|
|
189
185
|
cp -p "$PAQUET/$rel" "$folder/$rel"
|
|
190
186
|
if [ -x "$PAQUET/$rel" ]; then
|
|
@@ -195,7 +191,7 @@ update_workstation() {
|
|
|
195
191
|
[ -n "$rel" ] || continue
|
|
196
192
|
[ -f "$folder/$rel" ] || continue
|
|
197
193
|
if ! inside_folder "$folder" "$rel"; then
|
|
198
|
-
echo "devzone
|
|
194
|
+
echo "devzone: manifest: refused path: $rel" >&2
|
|
199
195
|
continue
|
|
200
196
|
fi
|
|
201
197
|
# rm does not follow links: only the link is removed, never its target
|
|
@@ -210,18 +206,18 @@ update_workstation() {
|
|
|
210
206
|
|
|
211
207
|
# 6. New manifest, then rebuild offered
|
|
212
208
|
write_manifest "$folder"
|
|
213
|
-
echo "✔ devzone $package
|
|
209
|
+
echo "✔ devzone $package: updated."
|
|
214
210
|
restart_ports_watcher "$folder"
|
|
215
211
|
# the update never changes the workstation mode (#472)
|
|
216
212
|
if [ "$(grep -E '^workspace=' "$folder/.devzone.modules" 2>/dev/null | tail -1)" = "workspace=kubernetes" ]; then
|
|
217
213
|
return 0
|
|
218
214
|
fi
|
|
219
215
|
if [ -n "$no_rebuild" ]; then
|
|
220
|
-
echo "
|
|
216
|
+
echo "Rebuild not started (--no-rebuild)."
|
|
221
217
|
return 0
|
|
222
218
|
fi
|
|
223
219
|
if [ ! -t 0 ]; then
|
|
224
|
-
echo "
|
|
220
|
+
echo "Rebuild: make -C $folder rebuild (run in a terminal)"
|
|
225
221
|
return 0
|
|
226
222
|
fi
|
|
227
223
|
printf 'Rebuild the container now? [y/N] ' >&2
|
|
@@ -229,7 +225,7 @@ update_workstation() {
|
|
|
229
225
|
case "$answer" in
|
|
230
226
|
y | Y | yes) ;;
|
|
231
227
|
*)
|
|
232
|
-
echo "
|
|
228
|
+
echo "Rebuild not started: make -C $folder rebuild"
|
|
233
229
|
return 0
|
|
234
230
|
;;
|
|
235
231
|
esac
|
|
@@ -155,7 +155,7 @@ argocd_toggle() {
|
|
|
155
155
|
# devzone workspace argocd status | app …
|
|
156
156
|
argocd_cmd() {
|
|
157
157
|
case "${1:-status}" in
|
|
158
|
-
status
|
|
158
|
+
status) argocd_status ;;
|
|
159
159
|
init)
|
|
160
160
|
gitops_init "${@:2}" || return $?
|
|
161
161
|
if argocd_installed; then gitops_root; fi
|
|
@@ -131,8 +131,8 @@ argocd_save_admin_password() {
|
|
|
131
131
|
|
|
132
132
|
# .password of the workstation regenerated from workspace/.*/ (password.sh of the package)
|
|
133
133
|
argocd_passwords_refresh() {
|
|
134
|
-
DEVZONE_ROOT="$PWD" bash "$RACINE/.devcontainer/password.sh"
|
|
135
|
-
echo "⚠ .password not updated (bash .devcontainer/password.sh
|
|
134
|
+
DEVZONE_ROOT="$PWD" bash "$RACINE/.devcontainer/password.sh" regenerate 2>/dev/null ||
|
|
135
|
+
echo "⚠ .password not updated (bash .devcontainer/password.sh regenerate)" >&2
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
# Installs Argo CD (pinned chart and values), idempotent (upgrade --install)
|
|
@@ -213,9 +213,9 @@ ports_status() {
|
|
|
213
213
|
# Subcommand "devzone workspace ports [start|stop|status]" (default: status).
|
|
214
214
|
ports() {
|
|
215
215
|
case "${1:-status}" in
|
|
216
|
-
start
|
|
217
|
-
stop
|
|
218
|
-
status
|
|
216
|
+
start) ports_start ;;
|
|
217
|
+
stop) ports_stop ;;
|
|
218
|
+
status) ports_status ;;
|
|
219
219
|
*) echo "✖ devzone workspace ports start|stop|status" >&2; return 1 ;;
|
|
220
220
|
esac
|
|
221
221
|
}
|
|
@@ -229,7 +229,7 @@ ports_etat() { ports_status "$@"; }
|
|
|
229
229
|
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
|
230
230
|
pw_guard quiet || exit 2
|
|
231
231
|
case "${1:-}" in
|
|
232
|
-
loop
|
|
233
|
-
round
|
|
232
|
+
loop) pw_loop ;;
|
|
233
|
+
round) pw_round ;;
|
|
234
234
|
esac
|
|
235
235
|
fi
|
|
@@ -173,8 +173,8 @@ services_status() {
|
|
|
173
173
|
services() {
|
|
174
174
|
local sub="${1:-}"
|
|
175
175
|
case "$sub" in
|
|
176
|
-
enable
|
|
177
|
-
disable
|
|
176
|
+
enable) services_run enable "${2:-}" "${@:3}" ;;
|
|
177
|
+
disable) services_run disable "${2:-}" "${@:3}" ;;
|
|
178
178
|
# The data of gitlab (group, demo project, dev user, runner) seeded
|
|
179
179
|
# again, in the pod (#538): the only seed of the services
|
|
180
180
|
seed)
|
|
@@ -184,7 +184,7 @@ services() {
|
|
|
184
184
|
fi
|
|
185
185
|
services_run seed gitlab
|
|
186
186
|
;;
|
|
187
|
-
status |
|
|
187
|
+
status | '') services_status ;;
|
|
188
188
|
*)
|
|
189
189
|
echo "✖ unknown subcommand: $sub ($(services_usage))" >&2
|
|
190
190
|
return 1
|
|
@@ -96,9 +96,6 @@ update_workspace() {
|
|
|
96
96
|
;;
|
|
97
97
|
esac
|
|
98
98
|
fi
|
|
99
|
-
# Former French names renamed once the update is confirmed (#733); the
|
|
100
|
-
# script comes from the package, the devzone folder is the current one
|
|
101
|
-
DEVZONE_ROOT="$PWD" bash "$ROOT/.devcontainer/rename-legacy-files.sh" || true
|
|
102
99
|
# Same path as workspace start, at the release: Argo CD revision and image tag
|
|
103
100
|
export DEVZONE_ARGOCD_REVISION="v$version"
|
|
104
101
|
workspace_deploy "$IMAGE_REPO" "$version" ""
|
package/manage/workspace.sh
CHANGED
|
@@ -141,20 +141,6 @@ shell_workspace() {
|
|
|
141
141
|
# shellcheck source=manage/scripts/workspace/workspace-egress.sh
|
|
142
142
|
. "$HERE/scripts/workspace/workspace-egress.sh"
|
|
143
143
|
|
|
144
|
-
# Renamed names (#695): an old French name is refused before anything runs, with
|
|
145
|
-
# its English name (« devzone workspace start »). A copied devzone may miss the
|
|
146
|
-
# aliases file: then no check.
|
|
147
|
-
# shellcheck source=../.devcontainer/command-aliases.sh
|
|
148
|
-
# shellcheck disable=SC1091
|
|
149
|
-
if [ -f "$ROOT/.devcontainer/command-aliases.sh" ]; then
|
|
150
|
-
. "$ROOT/.devcontainer/command-aliases.sh"
|
|
151
|
-
reject_renamed workspace "$@" || exit 1
|
|
152
|
-
if [ "${1:-}" = ports ] && [ "$#" -gt 1 ]; then
|
|
153
|
-
reject_renamed "workspace ports" "${@:2}" || exit 1
|
|
154
|
-
fi
|
|
155
|
-
fi
|
|
156
|
-
|
|
157
|
-
|
|
158
144
|
case "${1:-}" in
|
|
159
145
|
start) start_workspace "${@:2}" ;;
|
|
160
146
|
update) update_workspace "${@:2}" ;;
|