-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
84 lines (66 loc) · 3.29 KB
/
Copy pathjustfile
File metadata and controls
84 lines (66 loc) · 3.29 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
76
77
78
79
80
81
82
83
84
# secrets-bootstrap task runner. Install `just`: brew install just
#
# Copy config.example.sh to config.sh and fill in values before running.
# These recipes drive the three provisioning scripts in scripts/.
#
# List recipes: just (or `just --list`)
set shell := ["bash", "-uc"]
# Show available recipes
default:
@just --list
# ── Quick setup ───────────────────────────────────────────────────────────────
# Show the bootstrap installer command (curl | bash)
install-url:
@echo "curl -fsSL https://raw.githubusercontent.com/smicolon/secrets-bootstrap/main/install.sh | bash"
# ── Provisioning (run from your laptop with an active infisical login) ────────
# One command: project + identities -> migrate .env -> infisical run -> 1Password
all:
bash scripts/setup-all.sh
# Create the Infisical project + environments + machine identities
bootstrap:
bash scripts/bootstrap-infisical.sh
# Migrate .env secrets into Infisical for a target env (default: prod)
migrate env="prod":
TARGET_ENV={{env}} bash scripts/migrate-env-to-infisical.sh
# Dry-run the migration — prints key names and lengths only, no secret values, no writes
migrate-dry env="prod":
DRY_RUN=1 TARGET_ENV={{env}} bash scripts/migrate-env-to-infisical.sh
# Create the Infisical -> 1Password vault syncs
onepassword-sync:
bash scripts/bootstrap-1password-sync.sh
# Grant the Connect server a vault + rotate its token + update Infisical
grant-vault vault:
VAULT_NAME={{vault}} bash scripts/grant-1password-vault.sh
# Post-provisioning: write .infisical.json so `infisical run` needs no flags
setup-run:
bash scripts/setup-infisical-run.sh
# Run any command with secrets injected from Infisical, e.g. just run npm run dev
run *cmd:
bash scripts/run-with-secrets.sh {{cmd}}
# ── Inspection ────────────────────────────────────────────────────────────────
# List secret names for an environment (default: dev)
secrets env="dev":
infisical secrets --env={{env}} --domain="${INFISICAL_API_URL}"
# ── Linting ───────────────────────────────────────────────────────────────────
# Lint all shell scripts with shellcheck
lint:
shellcheck scripts/bootstrap-infisical.sh
shellcheck scripts/bootstrap-1password-sync.sh
shellcheck scripts/migrate-env-to-infisical.sh
shellcheck scripts/setup-infisical-run.sh
shellcheck scripts/run-with-secrets.sh
shellcheck scripts/grant-1password-vault.sh
shellcheck scripts/setup-all.sh
shellcheck install.sh
@echo "shellcheck passed"
# Syntax-check all scripts (bash -n, no execution)
syntax-check:
bash -n scripts/bootstrap-infisical.sh
bash -n scripts/bootstrap-1password-sync.sh
bash -n scripts/migrate-env-to-infisical.sh
bash -n scripts/setup-infisical-run.sh
bash -n scripts/run-with-secrets.sh
bash -n scripts/grant-1password-vault.sh
bash -n scripts/setup-all.sh
bash -n install.sh
@echo "syntax check passed"