devzone 2.0.0 → 4.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.
Files changed (100) hide show
  1. package/.devcontainer/agent-errors.sh +6 -6
  2. package/.devcontainer/agent-pod-manifest.sh +4 -4
  3. package/.devcontainer/agent-session.sh +2 -2
  4. package/.devcontainer/agent-state-json.sh +2 -2
  5. package/.devcontainer/agent-workspace.sh +1 -1
  6. package/.devcontainer/agent.sh +7 -7
  7. package/.devcontainer/ai/host-models.sh +2 -2
  8. package/.devcontainer/ai/plugins/devzone-guard-v2.js +3 -3
  9. package/.devcontainer/ai/plugins/devzone-guard.js +3 -3
  10. package/.devcontainer/argocd/argocd.sh +90 -89
  11. package/.devcontainer/argocd/catalog-argocd.sh +2 -2
  12. package/.devcontainer/argocd/services-hook.sh +3 -3
  13. package/.devcontainer/argocd/services.sh +1 -1
  14. package/.devcontainer/catalog/app.sh +114 -116
  15. package/.devcontainer/catalog/catalog-watcher.sh +62 -62
  16. package/.devcontainer/catalog/mysql/app.conf +1 -1
  17. package/.devcontainer/catalog/mysql/install.sh +40 -40
  18. package/.devcontainer/catalog/mysql/mysql.sh +141 -141
  19. package/.devcontainer/catalog/mysql/volume.sh +39 -39
  20. package/.devcontainer/catalog.sh +112 -112
  21. package/.devcontainer/chart-direct.sh +1 -1
  22. package/.devcontainer/cluster.sh +216 -218
  23. package/.devcontainer/clusters.sh +41 -41
  24. package/.devcontainer/command-aliases.sh +17 -8
  25. package/.devcontainer/devzone +93 -1496
  26. package/.devcontainer/devzone-ai-guard.sh +76 -0
  27. package/.devcontainer/devzone-ai.sh +201 -0
  28. package/.devcontainer/devzone-cluster.sh +210 -0
  29. package/.devcontainer/devzone-modules.sh +126 -0
  30. package/.devcontainer/devzone-platform.sh +189 -0
  31. package/.devcontainer/devzone-repair.sh +94 -0
  32. package/.devcontainer/devzone-services.sh +241 -0
  33. package/.devcontainer/devzone-skill.sh +97 -0
  34. package/.devcontainer/devzone-status.sh +140 -0
  35. package/.devcontainer/devzone-version.sh +78 -0
  36. package/.devcontainer/git-identity.sh +28 -0
  37. package/.devcontainer/gitlab/chart.sh +2 -2
  38. package/.devcontainer/gitlab/gitlab.sh +81 -82
  39. package/.devcontainer/gitlab/installation.sh +109 -109
  40. package/.devcontainer/gitlab/secrets.sh +47 -47
  41. package/.devcontainer/gitlab/seed.sh +77 -77
  42. package/.devcontainer/gitlab/test-gitlab.sh +242 -243
  43. package/.devcontainer/help.sh +1 -1
  44. package/.devcontainer/isolation.sh +30 -30
  45. package/.devcontainer/kind-wrapper.sh +17 -17
  46. package/.devcontainer/kube-account.sh +112 -113
  47. package/.devcontainer/kube-config.sh +45 -46
  48. package/.devcontainer/{invite-kube.sh → kube-prompt.sh} +6 -6
  49. package/.devcontainer/kube-reachable.sh +40 -40
  50. package/.devcontainer/memory.sh +1 -1
  51. package/.devcontainer/metrics-server.sh +2 -2
  52. package/.devcontainer/opencode.jsonc +2 -2
  53. package/.devcontainer/packages.sh +136 -135
  54. package/.devcontainer/password.sh +1 -1
  55. package/.devcontainer/ports-auto.sh +152 -153
  56. package/.devcontainer/ports-json.sh +16 -15
  57. package/.devcontainer/ports.sh +126 -122
  58. package/.devcontainer/post-create.sh +52 -52
  59. package/.devcontainer/postgres/postgres.sh +174 -174
  60. package/.devcontainer/rename-legacy-files.sh +103 -0
  61. package/.devcontainer/services-admin.sh +3 -3
  62. package/.devcontainer/skills/devzone/SKILL.md +40 -41
  63. package/.devcontainer/startup.sh +48 -49
  64. package/.devcontainer/state-gitops.sh +1 -1
  65. package/.devcontainer/state-json.sh +36 -62
  66. package/.devcontainer/state.sh +2 -2
  67. package/.devcontainer/workspace-init.sh +16 -2
  68. package/Makefile +1 -1
  69. package/README.md +191 -195
  70. package/charts/devzone-workspace/templates/statefulset.yaml +1 -1
  71. package/manage/devzone +7 -11
  72. package/manage/scripts/argocd-workspace.sh +1 -1
  73. package/manage/scripts/{check-charts.sh → ci/check-charts.sh} +1 -1
  74. package/manage/scripts/{check-english.sh → ci/check-english.sh} +1 -1
  75. package/manage/scripts/{check-go-layout.sh → ci/check-go-layout.sh} +1 -1
  76. package/manage/scripts/{check-names.sh → ci/check-names.sh} +7 -6
  77. package/manage/scripts/{check-utf8-vars.sh → ci/check-utf8-vars.sh} +1 -1
  78. package/manage/scripts/{versions.sh → ci/versions.sh} +8 -8
  79. package/manage/scripts/create-cluster.sh +1 -1
  80. package/manage/scripts/create-mode.sh +11 -18
  81. package/manage/scripts/devzone-create.sh +7 -35
  82. package/manage/scripts/devzone-manifest.sh +1 -1
  83. package/manage/scripts/devzone-update.sh +12 -8
  84. package/manage/scripts/launch.sh +7 -48
  85. package/manage/scripts/ports-apps.sh +1 -1
  86. package/manage/scripts/ports-workspace.sh +7 -7
  87. package/manage/scripts/poste.sh +6 -7
  88. package/manage/scripts/uninstall.sh +8 -8
  89. package/manage/scripts/workspace-egress.sh +2 -2
  90. package/manage/scripts/workspace-update.sh +5 -2
  91. package/manage/scripts/workspace-wait.sh +2 -2
  92. package/manage/workspace.sh +2 -12
  93. package/package.json +1 -1
  94. package/.devcontainer/docker-relay.sh +0 -149
  95. package/.devcontainer/docker-without-host.sh +0 -12
  96. package/.devcontainer/git-identite.sh +0 -28
  97. package/manage/scripts/docker-workstation.sh +0 -73
  98. package/manage/scripts/migrate-revert.sh +0 -60
  99. package/manage/scripts/migrate.sh +0 -243
  100. /package/manage/scripts/{ci-dns.sh → ci/ci-dns.sh} +0 -0
@@ -3,126 +3,126 @@
3
3
  # group devzone, demo project, dev user, runner. Sourced by gitlab.sh. The
4
4
  # installer starts the relays and waits for GitLab before the seed; the seed
5
5
  # command (devzone gitlab seed, run in the pod by services-admin.sh when Argo
6
- # CD holds the chart) does it itself (gitlab_seed_commande).
7
- # gitlab_attendre_pret waits for the readiness of GitLab (GITLAB_ATTENTE)
6
+ # CD holds the chart) does it itself (gitlab_seed_command).
7
+ # gitlab_wait_ready waits for the readiness of GitLab (GITLAB_ATTENTE)
8
8
  # gitlab_seed group, project, user, runner token and its Secret
9
- # gitlab_seed_commande devzone gitlab seed: relays, readiness, seed
9
+ # gitlab_seed_command devzone gitlab seed: relays, readiness, seed
10
10
 
11
- # ---- Helper : attendre que GitLab soit prêt ----
12
- gitlab_attendre_pret() {
13
- local debut
14
- debut=$(date +%s)
15
- echo "▶ Attente de GitLab prêt (timeout ${GITLAB_ATTENTE}s)…"
16
- while [ $(( $(date +%s) - debut )) -lt "$GITLAB_ATTENTE" ]; do
11
+ # ---- Helper: wait until GitLab is ready ----
12
+ gitlab_wait_ready() {
13
+ local start
14
+ start=$(date +%s)
15
+ echo "▶ Waiting for GitLab to be ready (timeout ${GITLAB_ATTENTE}s)…"
16
+ while [ $(( $(date +%s) - start )) -lt "$GITLAB_ATTENTE" ]; do
17
17
  if curl -sf http://gitlab.localhost:8929/-/readiness >/dev/null 2>&1 || curl -sf http://gitlab.localhost:8929/users/sign_in >/dev/null 2>&1; then
18
- echo "▶ GitLab prêt."
18
+ echo "▶ GitLab ready."
19
19
  return 0
20
20
  fi
21
21
  sleep 5
22
22
  done
23
- echo "devzone : timeout attente GitLab." >&2
23
+ echo "devzone : timeout waiting for GitLab." >&2
24
24
  return 1
25
25
  }
26
26
 
27
- # ---- seed : peupler GitLab de données de base ----
27
+ # ---- seed: fill GitLab with the base data ----
28
28
  gitlab_seed() {
29
- echo "▶ Seed de GitLab…"
29
+ echo "▶ Seeding GitLab…"
30
30
 
31
31
  mkdir -p "$GITLAB_SECRETS_DIR"
32
32
 
33
- # Mot de passe root lu dans le secret gitlab-gitlab-initial-root-password
34
- local mot_de_passe
35
- mot_de_passe="$(kubectl --context devzone get secret -n "$GITLAB_NS" gitlab-gitlab-initial-root-password -o jsonpath='{.data.password}' 2>/dev/null | base64 -d 2>/dev/null || true)"
36
- if [ -z "$mot_de_passe" ]; then
37
- echo "devzone : seed GitLab : secret root (gitlab-gitlab-initial-root-password) introuvable, arrêt du seed." >&2
33
+ # Root password read from the gitlab-gitlab-initial-root-password secret
34
+ local password
35
+ password="$(kubectl --context devzone get secret -n "$GITLAB_NS" gitlab-gitlab-initial-root-password -o jsonpath='{.data.password}' 2>/dev/null | base64 -d 2>/dev/null || true)"
36
+ if [ -z "$password" ]; then
37
+ echo "devzone : seed GitLab : root secret (gitlab-gitlab-initial-root-password) not found, seed stopped." >&2
38
38
  return 1
39
39
  fi
40
- printf '%s' "$mot_de_passe" > "$GITLAB_SECRETS_DIR/root-password"
40
+ printf '%s' "$password" > "$GITLAB_SECRETS_DIR/root-password"
41
41
  chmod 600 "$GITLAB_SECRETS_DIR/root-password"
42
42
 
43
- # Token d'accès root créé par kubectl exec dans le pod toolbox avec gitlab-rails runner
43
+ # Root access token created by kubectl exec in the toolbox pod with gitlab-rails runner
44
44
  local toolbox_pod root_token
45
45
  toolbox_pod="$(kubectl --context devzone get pod -n "$GITLAB_NS" -l app=toolbox -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)"
46
46
  if [ -z "$toolbox_pod" ]; then
47
- echo "devzone : seed GitLab : pod toolbox (label app=toolbox) introuvable, arrêt du seed." >&2
47
+ echo "devzone : seed GitLab : toolbox pod (label app=toolbox) not found, seed stopped." >&2
48
48
  return 1
49
49
  fi
50
50
  root_token="$(kubectl --context devzone exec -n "$GITLAB_NS" "$toolbox_pod" -- gitlab-rails runner 'puts User.find_by_username("root").personal_access_tokens.create(name: "devzone", scopes: ["api", "write_repository"], expires_at: 30.days.from_now).token' 2>/dev/null | tail -n 1 || true)"
51
51
  if [ -z "$root_token" ]; then
52
- echo "devzone : seed GitLab : création du jeton root (gitlab-rails runner) échouée, arrêt du seed." >&2
52
+ echo "devzone : seed GitLab : creation of the root token (gitlab-rails runner) failed, seed stopped." >&2
53
53
  return 1
54
54
  fi
55
55
  printf '%s' "$root_token" > "$GITLAB_SECRETS_DIR/root-token"
56
56
  chmod 600 "$GITLAB_SECRETS_DIR/root-token"
57
57
 
58
- # Via l'API curl avec le token (jamais affiché en clair)
59
- local token groupe_id
58
+ # Through the curl API with the token (never shown in clear)
59
+ local token group_id
60
60
  token="$(cat "$GITLAB_SECRETS_DIR/root-token")"
61
61
 
62
- # Groupe devzone (testé avant création)
62
+ # Group devzone (tested before creation)
63
63
  if ! curl -sf --header "PRIVATE-TOKEN: $token" "http://gitlab.localhost:8929/api/v4/groups/devzone" >/dev/null 2>&1; then
64
64
  if ! curl -sf --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/groups" --data "name=devzone&path=devzone&visibility=private" >/dev/null 2>&1; then
65
- echo "devzone : seed GitLab : création du groupe devzone échouée, arrêt du seed." >&2
65
+ echo "devzone : seed GitLab : creation of the devzone group failed, seed stopped." >&2
66
66
  return 1
67
67
  fi
68
68
  fi
69
- groupe_id="$(curl -s --header "PRIVATE-TOKEN: $token" "http://gitlab.localhost:8929/api/v4/groups/devzone" | jq -r '.id // empty')"
70
- if [ -z "$groupe_id" ]; then
71
- echo "devzone : seed GitLab : lecture de l'identifiant numérique du groupe devzone échouée, arrêt du seed." >&2
69
+ group_id="$(curl -s --header "PRIVATE-TOKEN: $token" "http://gitlab.localhost:8929/api/v4/groups/devzone" | jq -r '.id // empty')"
70
+ if [ -z "$group_id" ]; then
71
+ echo "devzone : seed GitLab : reading the numeric id of the devzone group failed, seed stopped." >&2
72
72
  return 1
73
73
  fi
74
74
 
75
- # Projet devzone/demo (testé avant création, namespace_id = ID numérique du groupe)
75
+ # Project devzone/demo (tested before creation, namespace_id = numeric ID of the group)
76
76
  if ! curl -sf --header "PRIVATE-TOKEN: $token" "http://gitlab.localhost:8929/api/v4/projects/devzone%2Fdemo" >/dev/null 2>&1; then
77
- if ! curl -sf --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/projects" --data "name=demo&namespace_id=$groupe_id" >/dev/null 2>&1; then
78
- echo "devzone : seed GitLab : création du projet devzone/demo échouée, arrêt du seed." >&2
77
+ if ! curl -sf --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/projects" --data "name=demo&namespace_id=$group_id" >/dev/null 2>&1; then
78
+ echo "devzone : seed GitLab : creation of the devzone/demo project failed, seed stopped." >&2
79
79
  return 1
80
80
  fi
81
81
  fi
82
82
 
83
- # Utilisateur dev (testé avant création, mot de passe généré aléatoirement) :
84
- # un dev-password existant n'est réutilisé que si l'utilisateur dev existe
85
- # encore (vérifié via l'API) ; sinon il est recréé avec un utilisateur nouveau.
86
- local users_json devpass
83
+ # Dev user (tested before creation, password generated at random):
84
+ # an existing dev-password is reused only if the dev user still exists
85
+ # (checked through the API); otherwise it is created again with a new user.
86
+ local users_json dev_password
87
87
  users_json="$(curl -s --header "PRIVATE-TOKEN: $token" "http://gitlab.localhost:8929/api/v4/users?username=dev")"
88
88
  if [ "$(jq length <<<"$users_json")" -eq 0 ]; then
89
- devpass="$(openssl rand -base64 18 | tr -d '\n')"
90
- if ! curl -sf --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/users" --data "email=dev@gitlab.localhost&username=dev&name=dev&skip_confirmation=true" --data-urlencode "password=$devpass" >/dev/null 2>&1; then
91
- echo "devzone : seed GitLab : création de l'utilisateur dev échouée, arrêt du seed." >&2
89
+ dev_password="$(openssl rand -base64 18 | tr -d '\n')"
90
+ if ! curl -sf --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/users" --data "email=dev@gitlab.localhost&username=dev&name=dev&skip_confirmation=true" --data-urlencode "password=$dev_password" >/dev/null 2>&1; then
91
+ echo "devzone : seed GitLab : creation of the dev user failed, seed stopped." >&2
92
92
  return 1
93
93
  fi
94
- printf '%s' "$devpass" > "$GITLAB_SECRETS_DIR/dev-password"
94
+ printf '%s' "$dev_password" > "$GITLAB_SECRETS_DIR/dev-password"
95
95
  chmod 600 "$GITLAB_SECRETS_DIR/dev-password"
96
96
  fi
97
97
 
98
- # Token de runner : vérifié via POST /api/v4/runners/verify ; un jeton valide
99
- # est gardé, un jeton refusé (403/404) est recréé, GitLab injoignable arrête le seed.
100
- local rt_jeton rt_code rt_token
98
+ # Runner token: checked through POST /api/v4/runners/verify; a valid token
99
+ # is kept, a refused token (403/404) is created again, GitLab unreachable stops the seed.
100
+ local runner_saved runner_code runner_token
101
101
  if [ -f "$GITLAB_SECRETS_DIR/runner-token" ]; then
102
- rt_jeton="$(cat "$GITLAB_SECRETS_DIR/runner-token")"
103
- rt_code="$(curl -s -o /dev/null -w '%{http_code}' --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/runners/verify" --data "token=${rt_jeton}" || true)"
104
- if [ "$rt_code" = "200" ]; then
105
- echo "✔ Jeton de runner valide : gardé."
106
- elif [ "$rt_code" = "403" ] || [ "$rt_code" = "404" ]; then
107
- echo "devzone : jeton de runner d'une installation précédente refusé : recréé."
108
- rt_token="$(curl -s --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/user/runners" --data "runner_type=instance_type" 2>/dev/null | jq -r '.token // empty' || true)"
109
- if [ -z "$rt_token" ]; then
110
- echo "devzone : seed GitLab : création du jeton de runner (POST /api/v4/user/runners) échouée, arrêt du seed." >&2
102
+ runner_saved="$(cat "$GITLAB_SECRETS_DIR/runner-token")"
103
+ runner_code="$(curl -s -o /dev/null -w '%{http_code}' --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/runners/verify" --data "token=${runner_saved}" || true)"
104
+ if [ "$runner_code" = "200" ]; then
105
+ echo "✔ Runner token valid: kept."
106
+ elif [ "$runner_code" = "403" ] || [ "$runner_code" = "404" ]; then
107
+ echo "devzone : runner token of a previous installation refused: recreated."
108
+ runner_token="$(curl -s --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/user/runners" --data "runner_type=instance_type" 2>/dev/null | jq -r '.token // empty' || true)"
109
+ if [ -z "$runner_token" ]; then
110
+ echo "devzone : seed GitLab : creation of the runner token (POST /api/v4/user/runners) failed, seed stopped." >&2
111
111
  return 1
112
112
  fi
113
- printf '%s' "$rt_token" > "$GITLAB_SECRETS_DIR/runner-token"
113
+ printf '%s' "$runner_token" > "$GITLAB_SECRETS_DIR/runner-token"
114
114
  chmod 600 "$GITLAB_SECRETS_DIR/runner-token"
115
115
  else
116
- echo "devzone : seed GitLab : vérification du jeton de runner impossible (code ${rt_code}), arrêt du seed." >&2
116
+ echo "devzone : seed GitLab : runner token check impossible (code ${runner_code}), seed stopped." >&2
117
117
  return 1
118
118
  fi
119
119
  else
120
- rt_token="$(curl -s --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/user/runners" --data "runner_type=instance_type" 2>/dev/null | jq -r '.token // empty' || true)"
121
- if [ -z "$rt_token" ]; then
122
- echo "devzone : seed GitLab : création du jeton de runner (POST /api/v4/user/runners) échouée, arrêt du seed." >&2
120
+ runner_token="$(curl -s --header "PRIVATE-TOKEN: $token" --request POST "http://gitlab.localhost:8929/api/v4/user/runners" --data "runner_type=instance_type" 2>/dev/null | jq -r '.token // empty' || true)"
121
+ if [ -z "$runner_token" ]; then
122
+ echo "devzone : seed GitLab : creation of the runner token (POST /api/v4/user/runners) failed, seed stopped." >&2
123
123
  return 1
124
124
  fi
125
- printf '%s' "$rt_token" > "$GITLAB_SECRETS_DIR/runner-token"
125
+ printf '%s' "$runner_token" > "$GITLAB_SECRETS_DIR/runner-token"
126
126
  chmod 600 "$GITLAB_SECRETS_DIR/runner-token"
127
127
  fi
128
128
 
@@ -133,7 +133,7 @@ gitlab_seed() {
133
133
  --from-literal=runner-registration-token= \
134
134
  --dry-run=client -o yaml |
135
135
  kubectl --context devzone -n "$GITLAB_NS" apply -f - >/dev/null 2>&1; then
136
- echo "devzone : seed GitLab : secret gitlab-runner-secret non créé, arrêt du seed." >&2
136
+ echo "devzone : seed GitLab : secret gitlab-runner-secret not created, seed stopped." >&2
137
137
  return 1
138
138
  fi
139
139
  # A runner already running may hold the previous token: restarted on the
@@ -141,17 +141,17 @@ gitlab_seed() {
141
141
  kubectl --context devzone -n "$GITLAB_NS" rollout restart deployment \
142
142
  --selector=app=gitlab-gitlab-runner >/dev/null 2>&1 || true
143
143
 
144
- # Push du contenu de demo/ dans devzone/demo (dépôt git temporaire, remote http avec le jeton dans l'URL, jamais affiché ; branche main)
145
- # Le push utilise le jeton root (write_repository) : le jeton de runner ne peut pas pousser.
144
+ # Push of the content of demo/ to devzone/demo (temporary git repository, http remote with the token in the URL, never shown; branch main)
145
+ # The push uses the root token (write_repository): the runner token cannot push.
146
146
  local push_token=""
147
147
  push_token="$(cat "$GITLAB_SECRETS_DIR/root-token")"
148
148
  if [ -z "$push_token" ]; then
149
- echo "devzone : seed GitLab : jeton root introuvable, arrêt du seed." >&2
149
+ echo "devzone : seed GitLab : root token not found, seed stopped." >&2
150
150
  return 1
151
151
  fi
152
- # Déjà poussé (installation relancée) : rien à refaire
152
+ # Already pushed (installation run again): nothing to do
153
153
  if curl -sf --header "PRIVATE-TOKEN: $push_token" "http://gitlab.localhost:8929/api/v4/projects/devzone%2Fdemo/repository/branches/main" >/dev/null 2>&1; then
154
- echo "✔ Seed GitLab terminé (projet demo déjà poussé)."
154
+ echo "✔ GitLab seed complete (demo project already pushed)."
155
155
  regenerer_identifiants
156
156
  return 0
157
157
  fi
@@ -161,32 +161,32 @@ gitlab_seed() {
161
161
  cp -r "$ICI/demo/." "$tmpdir/"
162
162
  if (
163
163
  cd "$tmpdir"
164
- # Dépôt jetable du script : les hooks git globaux (repowarden) n'ont
165
- # rien à vérifier ici et refuseraient le commit
164
+ # Throwaway repository of the script: the global git hooks (repowarden)
165
+ # have nothing to check here and would refuse the commit
166
166
  export GIT_CONFIG_PARAMETERS="'core.hooksPath=/dev/null'"
167
167
  git init -q -b main
168
168
  git add -A
169
169
  git -c user.email=dev@gitlab.localhost -c user.name=dev commit -q -m "chore: projet de démonstration"
170
- # gitlab.localhost n'est pas toujours résolu par git : adresse
171
- # locale, et l'hôte attendu par l'ingress passé en en-tête
170
+ # gitlab.localhost is not always resolved by git: local address,
171
+ # and the host expected by the ingress passed as a header
172
172
  git remote add origin "http://oauth2:${push_token}@127.0.0.1:8929/devzone/demo.git"
173
173
  git -c http.extraHeader="Host: gitlab.localhost" push -q -u origin main >/dev/null 2>&1
174
174
  ); then
175
- # Vérifie le push : la branche main existe bien sur le projet
175
+ # Checks the push: the main branch exists on the project
176
176
  if ! curl -sf --header "PRIVATE-TOKEN: $push_token" "http://gitlab.localhost:8929/api/v4/projects/devzone%2Fdemo/repository/branches/main" >/dev/null 2>&1; then
177
- echo "devzone : seed GitLab : push du projet demo sur /devzone/demo.git réussi mais branche main absente, arrêt du seed." >&2
177
+ echo "devzone : seed GitLab : push of the demo project to /devzone/demo.git succeeded but branch main is missing, seed stopped." >&2
178
178
  rm -rf "$tmpdir"
179
179
  return 1
180
180
  fi
181
181
  else
182
- echo "devzone : seed GitLab : push du projet demo sur /devzone/demo.git échoué, arrêt du seed." >&2
182
+ echo "devzone : seed GitLab : push of the demo project to /devzone/demo.git failed, seed stopped." >&2
183
183
  rm -rf "$tmpdir"
184
184
  return 1
185
185
  fi
186
186
  rm -rf "$tmpdir"
187
187
  fi
188
188
 
189
- echo "✔ Seed GitLab terminé."
189
+ echo "✔ GitLab seed complete."
190
190
  regenerer_identifiants
191
191
  }
192
192
 
@@ -194,11 +194,11 @@ gitlab_seed() {
194
194
  # workstation runs it in the pod, services-admin.sh seed gitlab). The API and
195
195
  # the push go through the relays: they start, GitLab is awaited, then the seed.
196
196
  # The Rails secret of the pod is mirrored when it is not kept yet.
197
- gitlab_seed_commande() {
198
- gitlab_relais_lancer || return 1
199
- gitlab_attendre_pret || return 1
197
+ gitlab_seed_command() {
198
+ gitlab_relay_start || return 1
199
+ gitlab_wait_ready || return 1
200
200
  gitlab_seed || return 1
201
- if [ ! -f "$GITLAB_RAILS_FICHIER" ]; then
202
- gitlab_secrets_copier
201
+ if [ ! -f "$GITLAB_RAILS_FILE" ]; then
202
+ gitlab_secrets_copy
203
203
  fi
204
204
  }