-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdevbox.json
More file actions
75 lines (75 loc) · 2.95 KB
/
devbox.json
File metadata and controls
75 lines (75 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox.schema.json",
"packages": [
"python311",
"python311Packages.pip",
"python311Packages.virtualenv",
"nodejs_20",
"awscli2",
"lastpass-cli",
"git",
"podman@latest",
"ruby@3.4.3",
"ruby_3_4@latest"
],
"env": {
"PYTHON_VERSION": "3.11.1",
"RUBY_VERSION": "3.4.3",
"NODE_VERSION": "20",
"LPASS_AGENT_TIMEOUT": "32400",
"PATH": "$DEVBOX_PROJECT_ROOT/.venv/bin:$PATH",
"VIRTUAL_ENV": "$DEVBOX_PROJECT_ROOT/.venv",
"ANSIBLE_VAULT_PASSWORD_FILE": "$DEVBOX_PROJECT_ROOT/bin/lastpass-ansible",
"ANSIBLE_VAULT_IDENTITY_LIST": "pul@$DEVBOX_PROJECT_ROOT/bin/lastpass-ansible,princeton@$DEVBOX_PROJECT_ROOT/bin/lastpass-ansible,ansible@$DEVBOX_PROJECT_ROOT/bin/lastpass-ansible,default@$DEVBOX_PROJECT_ROOT/bin/lastpass-ansible"
},
"shell": {
"init_hook": [
"echo 'Welcome to the Devbox shell!'",
"echo 'Run \"devbox run init\" to set up the Python environment'"
],
"scripts": {
"init": [
"test -d .venv || python -m venv .venv",
"test -d .venv && echo 'Virtual environment ready' || echo 'Failed to create virtual environment'",
"./.venv/bin/python -m pip install --upgrade pip",
"./.venv/bin/python -m pip install -r requirements.txt",
"touch .venv/.requirements_installed",
"gem install --no-document lastpass-ansible",
"ansible-galaxy collection install prometheus.prometheus",
"echo 'Setup complete!'"
],
"setup": [
"git config core.hooksPath .githooks",
"echo 'Git hooks configured: .githooks'"
],
"update-deps": [
"./.venv/bin/python -m pip install --upgrade pip",
"./.venv/bin/python -m pip install -r requirements.txt",
"touch .venv/.requirements_installed"
],
"clean": [
"rm -rf .venv",
"rm -rf .devbox"
],
"test": [
"ansible --version",
"ansible-lint --version",
"molecule --version"
],
"env-info": [
"echo \"ANSIBLE_VAULT_IDENTITY_LIST: ${ANSIBLE_VAULT_IDENTITY_LIST:-<unset>}\"",
"echo \"ANSIBLE_VAULT_PASSWORD_FILE: ${ANSIBLE_VAULT_PASSWORD_FILE:-<unset>}\"",
"echo \"LPASS_AGENT_TIMEOUT: ${LPASS_AGENT_TIMEOUT} (9 hours)\"",
"command -v lpass && lpass --version || echo 'LastPass CLI: not installed'",
"command -v lastpass-ansible && echo \"lastpass-ansible: $(command -v lastpass-ansible)\" || echo 'lastpass-ansible: not found'",
"command -v ansible && ansible --version | head -n1 || echo 'Ansible: not installed'"
],
"mtest": [
"env -u ANSIBLE_VAULT_IDENTITY_LIST -u ANSIBLE_VAULT_PASSWORD_FILE molecule test"
],
"mconverge": [
"env -u ANSIBLE_VAULT_IDENTITY_LIST -u ANSIBLE_VAULT_PASSWORD_FILE molecule converge"
]
}
}
}