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.
- package/.devcontainer/agent-errors.sh +6 -6
- package/.devcontainer/agent-pod-manifest.sh +4 -4
- package/.devcontainer/agent-session.sh +2 -2
- package/.devcontainer/agent-state-json.sh +2 -2
- package/.devcontainer/agent-workspace.sh +1 -1
- package/.devcontainer/agent.sh +7 -7
- package/.devcontainer/ai/host-models.sh +2 -2
- package/.devcontainer/ai/plugins/devzone-guard-v2.js +3 -3
- package/.devcontainer/ai/plugins/devzone-guard.js +3 -3
- package/.devcontainer/argocd/argocd.sh +90 -89
- package/.devcontainer/argocd/catalog-argocd.sh +2 -2
- package/.devcontainer/argocd/services-hook.sh +3 -3
- package/.devcontainer/argocd/services.sh +1 -1
- package/.devcontainer/catalog/app.sh +114 -116
- package/.devcontainer/catalog/catalog-watcher.sh +62 -62
- package/.devcontainer/catalog/mysql/app.conf +1 -1
- package/.devcontainer/catalog/mysql/install.sh +40 -40
- package/.devcontainer/catalog/mysql/mysql.sh +141 -141
- package/.devcontainer/catalog/mysql/volume.sh +39 -39
- package/.devcontainer/catalog.sh +112 -112
- package/.devcontainer/chart-direct.sh +1 -1
- package/.devcontainer/cluster.sh +216 -218
- package/.devcontainer/clusters.sh +41 -41
- package/.devcontainer/command-aliases.sh +17 -8
- package/.devcontainer/devzone +93 -1496
- package/.devcontainer/devzone-ai-guard.sh +76 -0
- package/.devcontainer/devzone-ai.sh +201 -0
- package/.devcontainer/devzone-cluster.sh +210 -0
- package/.devcontainer/devzone-modules.sh +126 -0
- package/.devcontainer/devzone-platform.sh +189 -0
- package/.devcontainer/devzone-repair.sh +94 -0
- package/.devcontainer/devzone-services.sh +241 -0
- package/.devcontainer/devzone-skill.sh +97 -0
- package/.devcontainer/devzone-status.sh +140 -0
- package/.devcontainer/devzone-version.sh +78 -0
- package/.devcontainer/git-identity.sh +28 -0
- package/.devcontainer/gitlab/chart.sh +2 -2
- package/.devcontainer/gitlab/gitlab.sh +81 -82
- package/.devcontainer/gitlab/installation.sh +109 -109
- package/.devcontainer/gitlab/secrets.sh +47 -47
- package/.devcontainer/gitlab/seed.sh +77 -77
- package/.devcontainer/gitlab/test-gitlab.sh +242 -243
- package/.devcontainer/help.sh +1 -1
- package/.devcontainer/isolation.sh +30 -30
- package/.devcontainer/kind-wrapper.sh +17 -17
- package/.devcontainer/kube-account.sh +112 -113
- package/.devcontainer/kube-config.sh +45 -46
- package/.devcontainer/{invite-kube.sh → kube-prompt.sh} +6 -6
- package/.devcontainer/kube-reachable.sh +40 -40
- package/.devcontainer/memory.sh +1 -1
- package/.devcontainer/metrics-server.sh +2 -2
- package/.devcontainer/opencode.jsonc +2 -2
- package/.devcontainer/packages.sh +136 -135
- package/.devcontainer/password.sh +1 -1
- package/.devcontainer/ports-auto.sh +152 -153
- package/.devcontainer/ports-json.sh +16 -15
- package/.devcontainer/ports.sh +126 -122
- package/.devcontainer/post-create.sh +52 -52
- package/.devcontainer/postgres/postgres.sh +174 -174
- package/.devcontainer/rename-legacy-files.sh +103 -0
- package/.devcontainer/services-admin.sh +3 -3
- package/.devcontainer/skills/devzone/SKILL.md +40 -41
- package/.devcontainer/startup.sh +48 -49
- package/.devcontainer/state-gitops.sh +1 -1
- package/.devcontainer/state-json.sh +36 -62
- package/.devcontainer/state.sh +2 -2
- package/.devcontainer/workspace-init.sh +16 -2
- package/Makefile +1 -1
- package/README.md +191 -195
- package/charts/devzone-workspace/templates/statefulset.yaml +1 -1
- package/manage/devzone +7 -11
- package/manage/scripts/argocd-workspace.sh +1 -1
- package/manage/scripts/{check-charts.sh → ci/check-charts.sh} +1 -1
- package/manage/scripts/{check-english.sh → ci/check-english.sh} +1 -1
- package/manage/scripts/{check-go-layout.sh → ci/check-go-layout.sh} +1 -1
- package/manage/scripts/{check-names.sh → ci/check-names.sh} +7 -6
- package/manage/scripts/{check-utf8-vars.sh → ci/check-utf8-vars.sh} +1 -1
- package/manage/scripts/{versions.sh → ci/versions.sh} +8 -8
- package/manage/scripts/create-cluster.sh +1 -1
- package/manage/scripts/create-mode.sh +11 -18
- package/manage/scripts/devzone-create.sh +7 -35
- package/manage/scripts/devzone-manifest.sh +1 -1
- package/manage/scripts/devzone-update.sh +12 -8
- package/manage/scripts/launch.sh +7 -48
- package/manage/scripts/ports-apps.sh +1 -1
- package/manage/scripts/ports-workspace.sh +7 -7
- package/manage/scripts/poste.sh +6 -7
- package/manage/scripts/uninstall.sh +8 -8
- package/manage/scripts/workspace-egress.sh +2 -2
- package/manage/scripts/workspace-update.sh +5 -2
- package/manage/scripts/workspace-wait.sh +2 -2
- package/manage/workspace.sh +2 -12
- package/package.json +1 -1
- package/.devcontainer/docker-relay.sh +0 -149
- package/.devcontainer/docker-without-host.sh +0 -12
- package/.devcontainer/git-identite.sh +0 -28
- package/manage/scripts/docker-workstation.sh +0 -73
- package/manage/scripts/migrate-revert.sh +0 -60
- package/manage/scripts/migrate.sh +0 -243
- /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 (
|
|
7
|
-
#
|
|
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
|
-
#
|
|
9
|
+
# gitlab_seed_command devzone gitlab seed: relays, readiness, seed
|
|
10
10
|
|
|
11
|
-
# ---- Helper
|
|
12
|
-
|
|
13
|
-
local
|
|
14
|
-
|
|
15
|
-
echo "▶
|
|
16
|
-
while [ $(( $(date +%s) -
|
|
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
|
|
18
|
+
echo "▶ GitLab ready."
|
|
19
19
|
return 0
|
|
20
20
|
fi
|
|
21
21
|
sleep 5
|
|
22
22
|
done
|
|
23
|
-
echo "devzone : timeout
|
|
23
|
+
echo "devzone : timeout waiting for GitLab." >&2
|
|
24
24
|
return 1
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
# ---- seed
|
|
27
|
+
# ---- seed: fill GitLab with the base data ----
|
|
28
28
|
gitlab_seed() {
|
|
29
|
-
echo "▶
|
|
29
|
+
echo "▶ Seeding GitLab…"
|
|
30
30
|
|
|
31
31
|
mkdir -p "$GITLAB_SECRETS_DIR"
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
local
|
|
35
|
-
|
|
36
|
-
if [ -z "$
|
|
37
|
-
echo "devzone : seed GitLab : secret
|
|
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' "$
|
|
40
|
+
printf '%s' "$password" > "$GITLAB_SECRETS_DIR/root-password"
|
|
41
41
|
chmod 600 "$GITLAB_SECRETS_DIR/root-password"
|
|
42
42
|
|
|
43
|
-
#
|
|
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
|
|
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 :
|
|
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
|
-
#
|
|
59
|
-
local token
|
|
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
|
-
#
|
|
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 :
|
|
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
|
-
|
|
70
|
-
if [ -z "$
|
|
71
|
-
echo "devzone : seed GitLab :
|
|
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
|
-
#
|
|
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=$
|
|
78
|
-
echo "devzone : seed GitLab :
|
|
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
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
local users_json
|
|
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
|
-
|
|
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=$
|
|
91
|
-
echo "devzone : seed GitLab :
|
|
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' "$
|
|
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
|
-
#
|
|
99
|
-
#
|
|
100
|
-
local
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
if [ "$
|
|
105
|
-
echo "✔
|
|
106
|
-
elif [ "$
|
|
107
|
-
echo "devzone :
|
|
108
|
-
|
|
109
|
-
if [ -z "$
|
|
110
|
-
echo "devzone : seed GitLab :
|
|
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' "$
|
|
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 :
|
|
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
|
-
|
|
121
|
-
if [ -z "$
|
|
122
|
-
echo "devzone : seed GitLab :
|
|
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' "$
|
|
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
|
|
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
|
|
145
|
-
#
|
|
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 :
|
|
149
|
+
echo "devzone : seed GitLab : root token not found, seed stopped." >&2
|
|
150
150
|
return 1
|
|
151
151
|
fi
|
|
152
|
-
#
|
|
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 "✔
|
|
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
|
-
#
|
|
165
|
-
#
|
|
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
|
|
171
|
-
#
|
|
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
|
-
#
|
|
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
|
|
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
|
|
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 "✔
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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 "$
|
|
202
|
-
|
|
201
|
+
if [ ! -f "$GITLAB_RAILS_FILE" ]; then
|
|
202
|
+
gitlab_secrets_copy
|
|
203
203
|
fi
|
|
204
204
|
}
|