devzone 7.7.1 → 7.7.3
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/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 +3 -1
- package/package.json +1 -2
- package/manage/workspace.sh +0 -169
package/bin/SHA256SUMS
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
e380acc8d20a883ea4af68d8d72c1fb7f64e79b9e1b16502eaae72fff789c59d devzone-linux-amd64
|
|
2
|
+
d4c8ffdd1dfd1393f8b5b32bf95f334b7f2cda376768e2121d77e980b0a9595d devzone-linux-arm64
|
|
3
|
+
a8c28f5e674937b01c26c57b1df12d23dbf66c87e7f4396a47e38a403718860b devzone-darwin-amd64
|
|
4
|
+
0c5bcbd981b82b421d74a5141bb61676a253f3521693decd12f669abe5272b43 devzone-darwin-arm64
|
|
5
|
+
4a6d818abfee4c1a779de88ca068da839cb70aedf93cb60486fa4f93ee21c665 devzone-windows-amd64.exe
|
|
6
|
+
5f6ae3d4ecdd9f878197a92d6c0e3ef04013135c407b7a1be536e2600743de90 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
|
@@ -218,7 +218,9 @@ case "${1:-}" in
|
|
|
218
218
|
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" uninstall "${@:2}"
|
|
219
219
|
;;
|
|
220
220
|
workspace)
|
|
221
|
-
|
|
221
|
+
# The workspace is Go since #934: the bash entry point only forwards to
|
|
222
|
+
# the Go program, as update and uninstall do, so no logic stays here.
|
|
223
|
+
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace "${@:2}"
|
|
222
224
|
;;
|
|
223
225
|
-*)
|
|
224
226
|
echo "✖ option inconnue : $1 (devzone --help)" >&2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devzone",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.3",
|
|
4
4
|
"description": "Ton poste de développement Linux, prêt en une commande, identique sur Mac, Windows et Linux.",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"manage/scripts/",
|
|
32
32
|
"README.md",
|
|
33
33
|
"LICENSE",
|
|
34
|
-
"manage/workspace.sh",
|
|
35
34
|
"charts/"
|
|
36
35
|
]
|
|
37
36
|
}
|
package/manage/workspace.sh
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Workstation commands for the Kubernetes workspace (#398, #399): drives the
|
|
3
|
-
# charts/devzone-workspace chart with host helm and kubectl.
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
-
ROOT="$(cd "$HERE/.." && pwd)"
|
|
8
|
-
# shellcheck disable=SC2034 # read by the argocd scripts and by .devcontainer/argocd/services.sh (shared with the pod)
|
|
9
|
-
RACINE="$ROOT"
|
|
10
|
-
# Pod, namespace and projects folder inside the container (#399).
|
|
11
|
-
# shellcheck disable=SC2034 # read by the scripts sourced from scripts/workspace/
|
|
12
|
-
POD="devzone-workspace-0"
|
|
13
|
-
# shellcheck disable=SC2034 # read by the scripts sourced from scripts/workspace/
|
|
14
|
-
NAMESPACE="devzone-workspace"
|
|
15
|
-
PROJECTS_DIR="/workspaces/projets"
|
|
16
|
-
# compatibility alias, removed with lot 4 (#509)
|
|
17
|
-
# shellcheck disable=SC2034
|
|
18
|
-
DOSSIER_PROJETS="$PROJECTS_DIR"
|
|
19
|
-
|
|
20
|
-
# Helm flag: devzone context if it exists, otherwise current context (no flag).
|
|
21
|
-
helm_flag() {
|
|
22
|
-
if kubectl config get-contexts -o name 2>/dev/null | grep -qx 'devzone'; then
|
|
23
|
-
printf -- '--kube-context devzone'
|
|
24
|
-
fi
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
# kubectl flag: devzone context if it exists, otherwise current context (no flag).
|
|
28
|
-
kubectl_flag() {
|
|
29
|
-
if kubectl config get-contexts -o name 2>/dev/null | grep -qx 'devzone'; then
|
|
30
|
-
printf -- '--context devzone'
|
|
31
|
-
fi
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
# Chart path in the repository (or installed package).
|
|
35
|
-
chart_path() { printf '%s/charts/devzone-workspace' "$ROOT"; }
|
|
36
|
-
|
|
37
|
-
# Repository of the image published at each devzone release.
|
|
38
|
-
IMAGE_REPO="ghcr.io/simbienvenuehoulboumi/devzone-workspace"
|
|
39
|
-
|
|
40
|
-
# Why: without tag, the chart takes its appVersion (0.1.0), an image never
|
|
41
|
-
# published; the package version is published at each release, and a
|
|
42
|
-
# development clone (0.0.0) uses latest.
|
|
43
|
-
default_image_tag() {
|
|
44
|
-
local version
|
|
45
|
-
version="$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$ROOT/package.json" | head -1)"
|
|
46
|
-
if [ -z "$version" ] || [ "$version" = "0.0.0" ]; then
|
|
47
|
-
echo "latest"
|
|
48
|
-
else
|
|
49
|
-
echo "$version"
|
|
50
|
-
fi
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
# Installs or upgrades the workspace in the cluster; the cluster is checked first (#565): no Argo CD, helm or pod wait for a stopped one.
|
|
54
|
-
start_workspace() {
|
|
55
|
-
local repo tag image with_image="" args=()
|
|
56
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" kube-ready --hint >&2 || return 1
|
|
57
|
-
repo="$IMAGE_REPO"
|
|
58
|
-
tag="$(default_image_tag)"
|
|
59
|
-
while [ $# -gt 0 ]; do
|
|
60
|
-
case "$1" in
|
|
61
|
-
--image)
|
|
62
|
-
if [ $# -lt 2 ] || [ -z "$2" ]; then
|
|
63
|
-
echo "✖ option --image: provide an image <repository:tag> (devzone workspace start --image <repository:tag>)" >&2
|
|
64
|
-
return 1
|
|
65
|
-
fi
|
|
66
|
-
case "$2" in
|
|
67
|
-
*:*)
|
|
68
|
-
repo="${2%:*}"
|
|
69
|
-
tag="${2##*:}"
|
|
70
|
-
with_image=yes
|
|
71
|
-
;;
|
|
72
|
-
*)
|
|
73
|
-
echo "✖ option --image: image has no tag, expected <repository:tag> (devzone workspace start --image <repository:tag>)" >&2
|
|
74
|
-
return 1
|
|
75
|
-
;;
|
|
76
|
-
esac
|
|
77
|
-
shift 2
|
|
78
|
-
;;
|
|
79
|
-
*)
|
|
80
|
-
echo "✖ unknown option: $1 (devzone workspace start [--image <repository:tag>])" >&2
|
|
81
|
-
return 1
|
|
82
|
-
;;
|
|
83
|
-
esac
|
|
84
|
-
done
|
|
85
|
-
image="$repo:$tag"
|
|
86
|
-
# Argo CD first when wanted (#516): the workspace is then an Application
|
|
87
|
-
if [ "$(grep '^argocd=' .devzone.modules 2>/dev/null | tail -1 | cut -d= -f2-)" != off ]; then
|
|
88
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace services enable argocd || echo "⚠ Argo CD not installed: the workspace is deployed with helm directly (devzone workspace services enable argocd to retry)" >&2
|
|
89
|
-
fi
|
|
90
|
-
rc=0
|
|
91
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace deploy "$repo" "$tag" "$with_image" || rc=$?
|
|
92
|
-
if [ "$rc" -eq 3 ]; then
|
|
93
|
-
workspace_helm_deploy "$repo" "$tag" "$with_image"
|
|
94
|
-
elif [ "$rc" -ne 0 ]; then
|
|
95
|
-
return "$rc"
|
|
96
|
-
fi
|
|
97
|
-
# Projects of .argocd.conf held too (#516)
|
|
98
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace argocd reconcile || true
|
|
99
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace wait "$image" || return 1
|
|
100
|
-
"${DEVZONE_HOST_BIN:-false}" workspace agents-guard || true
|
|
101
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace ports start
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
# helm direct: the chart of the package, image set by the options
|
|
105
|
-
workspace_helm_deploy() {
|
|
106
|
-
local repo="$1" tag="$2" with_image="$3" args=()
|
|
107
|
-
args=(--namespace devzone-workspace --create-namespace)
|
|
108
|
-
[ -z "$with_image" ] || args+=(--set "image.repository=$repo")
|
|
109
|
-
args+=(--set "image.tag=$tag")
|
|
110
|
-
# latest moves at every release: an image already on the node would stay
|
|
111
|
-
# the old one with IfNotPresent (#515)
|
|
112
|
-
[ "$tag" != latest ] || args+=(--set "image.pullPolicy=Always")
|
|
113
|
-
# egress proxy settings (#633), replayed at each start: commas escaped for helm
|
|
114
|
-
for p in $("${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace egress params | sed 's/,/\\,/g'); do args+=(--set "$p"); done
|
|
115
|
-
# shellcheck disable=SC2046
|
|
116
|
-
helm $(helm_flag) upgrade --install devzone-workspace "$(chart_path)" "${args[@]}"
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
# Uninstalls the workspace from the cluster (Argo CD Application or helm release).
|
|
120
|
-
stop_workspace() {
|
|
121
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace ports stop || true
|
|
122
|
-
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace stop
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
# Opens a shell in the workspace container.
|
|
126
|
-
shell_workspace() {
|
|
127
|
-
# shellcheck disable=SC2046
|
|
128
|
-
kubectl $(kubectl_flag) exec -it devzone-workspace-0 --namespace devzone-workspace -c workspace -- bash
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
case "${1:-}" in
|
|
133
|
-
start) start_workspace "${@:2}" ;;
|
|
134
|
-
update) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace update "${@:2}" ;;
|
|
135
|
-
stop) stop_workspace ;;
|
|
136
|
-
status) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace status ;;
|
|
137
|
-
shell) shell_workspace ;;
|
|
138
|
-
ports) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace ports "${@:2}" ;;
|
|
139
|
-
services) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace services "${@:2}" ;;
|
|
140
|
-
argocd)
|
|
141
|
-
sub="${2:-status}"
|
|
142
|
-
case "$sub" in
|
|
143
|
-
status) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace argocd status ;;
|
|
144
|
-
init) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace argocd init "${@:3}" ;;
|
|
145
|
-
apply) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace argocd apply ;;
|
|
146
|
-
app) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace argocd app "${@:3}" ;;
|
|
147
|
-
*)
|
|
148
|
-
echo "✖ devzone workspace argocd status | init [--repo <url>|--none] | apply | app add <repo url> [path] [--name N] [--revision R] | app list | app remove <N>" >&2
|
|
149
|
-
exit 1
|
|
150
|
-
;;
|
|
151
|
-
esac
|
|
152
|
-
;;
|
|
153
|
-
egress) "${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" workspace egress "${@:2}" ;;
|
|
154
|
-
'' | -h | --help | help)
|
|
155
|
-
echo "devzone workspace start|stop|status|shell|ports|services|argocd|update|egress"
|
|
156
|
-
echo " start [--image repository:tag] install workspace (image for devzone version by default)"
|
|
157
|
-
echo " update [--version X.Y.Z] [--yes] move to the latest stable release (or X.Y.Z); the pod is recreated"
|
|
158
|
-
echo " ports [start|stop|status] applications and services from pod on workstation localhost"
|
|
159
|
-
echo " services enable|disable <service> [options] | status"
|
|
160
|
-
echo " devzone services (gitlab, postgres, argocd) of the cluster, installed from the workstation"
|
|
161
|
-
echo " argocd status | init [--repo <url>|--none] | apply | app add <repo url> [path] [--name N] [--revision R] | app list | app remove <N>"
|
|
162
|
-
echo " Argo CD of the workspace: .argocd.conf, GitOps repository, your projects as Applications"
|
|
163
|
-
echo " egress observation|strict|off|status|allow <domain>|deny <domain> egress proxy of the agent sessions (--pod)"
|
|
164
|
-
;;
|
|
165
|
-
*)
|
|
166
|
-
echo "✖ unknown subcommand: $1 (devzone workspace start|stop|status|shell|ports|services|argocd|update)" >&2
|
|
167
|
-
exit 1
|
|
168
|
-
;;
|
|
169
|
-
esac
|