gcb-host 0.8.0 → 0.9.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/CHANGELOG.md +33 -0
- package/lib/commands/authorize.d.ts +1 -1
- package/lib/commands/authorize.d.ts.map +1 -1
- package/lib/commands/authorize.js +23 -11
- package/lib/commands/authorize.js.map +1 -1
- package/lib/commands/compose.d.ts +4 -6
- package/lib/commands/compose.d.ts.map +1 -1
- package/lib/commands/compose.js +24 -27
- package/lib/commands/compose.js.map +1 -1
- package/lib/commands/host.d.ts.map +1 -1
- package/lib/commands/host.js +238 -7
- package/lib/commands/host.js.map +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +16 -0
- package/lib/config.js.map +1 -1
- package/lib/providers/github-app.d.ts.map +1 -1
- package/lib/providers/github-app.js +9 -3
- package/lib/providers/github-app.js.map +1 -1
- package/lib/token-lock.d.ts +34 -0
- package/lib/token-lock.d.ts.map +1 -0
- package/lib/token-lock.js +135 -0
- package/lib/token-lock.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# gcb-host
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#142](https://github.com/code-vaults/git-credential-broker/pull/142) [`d26ea16`](https://github.com/code-vaults/git-credential-broker/commit/d26ea16a5c0df22e4865ee3947009a3be1266297) Thanks [@i1stG](https://github.com/i1stG)! - Allow host-broker requests made outside a checkout to use the shared
|
|
8
|
+
`~/.gcb-host/channel`; they still require an explicit `--repo` and the same allowlist and account
|
|
9
|
+
checks. The channel is a pre-created, host-owned 0700 directory; the broker validates it and does
|
|
10
|
+
not create or chmod it.
|
|
11
|
+
|
|
12
|
+
- [#136](https://github.com/code-vaults/git-credential-broker/pull/136) [`bcc1373`](https://github.com/code-vaults/git-credential-broker/commit/bcc1373cedabeca2d267bd07ab85db15e98895a2) Thanks [@JounQin](https://github.com/JounQin)! - Add `gcb push` (explicit host-executed push; a deliberate exception to native Git): the host broker pushes an exact commit with its own gh account, or its SSH
|
|
13
|
+
agent/key when the selected remote uses SSH. A destination fork is allowed when `allowForkPush` verifies its parent/source against the allowlist;
|
|
14
|
+
the command takes a git-style remote and branch, and the request carries the repository, remote,
|
|
15
|
+
branch, exact commit, optional force/lease expectation, account and proxy; `--force` and `--force-with-lease` are explicit. Other push arguments are not passed through; no token or container-controlled remote URL enters the host push.
|
|
16
|
+
The container runs its own `pre-push` hook; the host never runs container-owned hooks.
|
|
17
|
+
|
|
18
|
+
- [#144](https://github.com/code-vaults/git-credential-broker/pull/144) [`e55194f`](https://github.com/code-vaults/git-credential-broker/commit/e55194f7a09fe64edf08f20c4cfff9afa7b13326) Thanks [@JounQin](https://github.com/JounQin)! - Serialize refresh-token renewal and `gcb authorize` with a shared `user.refresh.lock` directory, and
|
|
19
|
+
replace the token under the lock. Re-authorizing a running sidecar no longer requires stopping it.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`d26ea16`](https://github.com/code-vaults/git-credential-broker/commit/d26ea16a5c0df22e4865ee3947009a3be1266297), [`bcc1373`](https://github.com/code-vaults/git-credential-broker/commit/bcc1373cedabeca2d267bd07ab85db15e98895a2)]:
|
|
24
|
+
- gcb-core@0.9.0
|
|
25
|
+
|
|
26
|
+
## 0.8.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- [#133](https://github.com/code-vaults/git-credential-broker/pull/133) [`53eafd7`](https://github.com/code-vaults/git-credential-broker/commit/53eafd732e4cbc7e282ce801c588288912f2603e) Thanks [@JounQin](https://github.com/JounQin)! - `compose` now emits the released `ghcr.io/code-vaults/gcb-host:<version>` image and runs its installed
|
|
31
|
+
`gcb daemon` binary. It no longer generates an `npx --package gcb-host` command or accepts `--package`.
|
|
32
|
+
The `--code` staged-code mode is unchanged.
|
|
33
|
+
- Updated dependencies []:
|
|
34
|
+
- gcb-core@0.8.1
|
|
35
|
+
|
|
3
36
|
## 0.8.0
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -61,7 +61,7 @@ export declare function openTokenTarget(target: string): number;
|
|
|
61
61
|
* @param input - The configuration path, target override and injectable guards.
|
|
62
62
|
* @returns The target and an optional warning.
|
|
63
63
|
* @throws {Error} When the placement would put the token inside a container mount without the
|
|
64
|
-
*
|
|
64
|
+
* explicit broker-container acknowledgement.
|
|
65
65
|
*/
|
|
66
66
|
export declare function resolveAuthorizationPlacement(input: AuthorizationPlacementInput): AuthorizationPlacement;
|
|
67
67
|
export declare function runAuthorize(argv: readonly string[]): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorize.d.ts","sourceRoot":"","sources":["../../src/commands/authorize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"authorize.d.ts","sourceRoot":"","sources":["../../src/commands/authorize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAYH,kCAAkC;AAClC,eAAO,MAAM,eAAe,mnCAkB3B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEtF;AAED,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAA;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;CACzD;AAED,oFAAoF;AACpF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBtD;AAaD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,2BAA2B,GACjC,sBAAsB,CAsBxB;AAUD,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAgH3E"}
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Exit codes: 0 stored, 1 refused.
|
|
14
14
|
*/
|
|
15
|
-
import { closeSync, constants, fchmodSync, fstatSync,
|
|
15
|
+
import { closeSync, constants, fchmodSync, fstatSync, mkdirSync, openSync } from 'node:fs';
|
|
16
16
|
import { dirname, join, resolve as resolvePath } from 'node:path';
|
|
17
17
|
import { fail, insideMountedPath, isInsideContainer, parseArgs, say, warn } from 'gcb-core';
|
|
18
18
|
import { USER_TOKEN_FILE, userTokenPath, loadConfig, resolveConfigPath } from '../config.js';
|
|
19
19
|
import { collectUserToken, startDeviceFlow } from '../device-flow.js';
|
|
20
20
|
import { fetcherFor, parseProxy } from '../http.js';
|
|
21
|
+
import { withTokenLock, writeTokenThrough } from '../token-lock.js';
|
|
21
22
|
/** Usage text for `authorize`. */
|
|
22
23
|
export const AUTHORIZE_USAGE = `Usage: gcb authorize [options]
|
|
23
24
|
|
|
@@ -71,7 +72,10 @@ export function brokerReadsPath(privateKeyPath) {
|
|
|
71
72
|
*/
|
|
72
73
|
export function openTokenTarget(target) {
|
|
73
74
|
mkdirSync(dirname(target), { recursive: true, mode: 0o700 });
|
|
74
|
-
const flags = constants.O_WRONLY |
|
|
75
|
+
const flags = constants.O_WRONLY |
|
|
76
|
+
constants.O_CREAT |
|
|
77
|
+
(constants.O_NOFOLLOW ?? 0) |
|
|
78
|
+
(constants.O_NONBLOCK ?? 0);
|
|
75
79
|
const fd = openSync(target, flags, 0o600);
|
|
76
80
|
try {
|
|
77
81
|
const info = fstatSync(fd);
|
|
@@ -90,12 +94,16 @@ export function openTokenTarget(target) {
|
|
|
90
94
|
throw error;
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
|
-
/**
|
|
94
|
-
function writeToken(fd, token) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
/** Replace the token through the validated descriptor, under its lock. */
|
|
98
|
+
async function writeToken(fd, target, token) {
|
|
99
|
+
try {
|
|
100
|
+
await withTokenLock(target, async () => {
|
|
101
|
+
writeTokenThrough(fd, token);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
finally {
|
|
105
|
+
closeSync(fd);
|
|
106
|
+
}
|
|
99
107
|
}
|
|
100
108
|
/**
|
|
101
109
|
* Decide where the refresh token goes, and whether that placement is allowed.
|
|
@@ -103,7 +111,7 @@ function writeToken(fd, token) {
|
|
|
103
111
|
* @param input - The configuration path, target override and injectable guards.
|
|
104
112
|
* @returns The target and an optional warning.
|
|
105
113
|
* @throws {Error} When the placement would put the token inside a container mount without the
|
|
106
|
-
*
|
|
114
|
+
* explicit broker-container acknowledgement.
|
|
107
115
|
*/
|
|
108
116
|
export function resolveAuthorizationPlacement(input) {
|
|
109
117
|
const target = input.to ?? refreshTokenPath(input.configPath);
|
|
@@ -195,13 +203,17 @@ export async function runAuthorize(argv) {
|
|
|
195
203
|
throw new Error('GitHub returned no refresh token, so the token would expire in eight hours with no way to renew.\n' +
|
|
196
204
|
' Select "Expire user authorization tokens" in the app settings and authorize again.');
|
|
197
205
|
}
|
|
198
|
-
|
|
206
|
+
const fd = tokenFd;
|
|
207
|
+
tokenFd = undefined;
|
|
208
|
+
await writeToken(fd, placement.target, token.refreshToken);
|
|
199
209
|
}
|
|
200
210
|
catch (error) {
|
|
201
211
|
failure = error;
|
|
202
212
|
}
|
|
203
213
|
finally {
|
|
204
|
-
|
|
214
|
+
if (tokenFd !== undefined) {
|
|
215
|
+
closeSync(tokenFd);
|
|
216
|
+
}
|
|
205
217
|
}
|
|
206
218
|
if (failure !== undefined) {
|
|
207
219
|
fail(failure.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../src/commands/authorize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../src/commands/authorize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAA;AAEjE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE3F,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAgB,MAAM,mBAAmB,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEnE,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;CAkB9B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAk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A8F,CAC/F,CAAA;QACD,GAAG,CAAC,qFAAqF,CAAC,CAAA;IAC5F,CAAC;SAAM,IAAI,WAAW,CAAC,YAAY,CAAC,KAAK,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACvE,GAAG,CACD,oGAAoG,CACrG,CAAA;IACH,CAAC;SAAM,CAAC;QACN,GAAG,CACD,iCAAiC,YAAY,gDAAgD,CAC9F,CAAA;QACD,GAAG,CAAC,oEAAoE,CAAC,CAAA;IAC3E,CAAC;IACD,GAAG,CACD,8FAA8F,CAC/F,CAAA;IACD,OAAO,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -8,16 +8,14 @@ export interface ComposeInput {
|
|
|
8
8
|
readonly socketDir: string;
|
|
9
9
|
/** `uid:gid` the sidecar runs as; must match the container that needs the socket. */
|
|
10
10
|
readonly user: string;
|
|
11
|
-
/** Base image. */
|
|
11
|
+
/** Base image; the released host image contains the `gcb` binary. */
|
|
12
12
|
readonly image: string;
|
|
13
|
-
/** Npm spec to run, e.g. `gcb@0.0.0`. */
|
|
14
|
-
readonly packageSpec: string;
|
|
15
13
|
/** Compose service and container name. */
|
|
16
14
|
readonly name: string;
|
|
17
15
|
/**
|
|
18
16
|
* Host directory holding the broker's code, as `stage` exports it. When given, the sidecar runs
|
|
19
|
-
* that code with the image's Node instead of
|
|
20
|
-
* boot, and the commit that runs is the one you reviewed.
|
|
17
|
+
* that code with the image's Node instead of running the image's installed binary: no registry
|
|
18
|
+
* access at boot, and the commit that runs is the one you reviewed.
|
|
21
19
|
*/
|
|
22
20
|
readonly code?: string;
|
|
23
21
|
}
|
|
@@ -31,7 +29,7 @@ export declare const CODE_DIR = "/opt/gcb";
|
|
|
31
29
|
*/
|
|
32
30
|
export declare function renderCompose(input: ComposeInput): string;
|
|
33
31
|
/** Usage text for `compose`. */
|
|
34
|
-
export declare const COMPOSE_USAGE = "Usage: gcb compose [options]\n\nPrint a Docker sidecar definition for the broker (to stdout). Pair it with a config written by\n`init --mode sidecar`, whose paths this file fixes.\n\n --dir <path> Host directory holding broker.config.yml, app.pem and log/ (default: the config's directory)\n --config <path> The sidecar's config, checked before anything is printed\n (default: $GIT_BROKER_CONFIG, else ./broker.config.yml)\n --socket-dir <path> Host directory the pushing container already mounts\n --code <path> Run code mounted from this host directory instead of
|
|
32
|
+
export declare const COMPOSE_USAGE = "Usage: gcb compose [options]\n\nPrint a Docker sidecar definition for the broker (to stdout). Pair it with a config written by\n`init --mode sidecar`, whose paths this file fixes.\n\n --dir <path> Host directory holding broker.config.yml, app.pem and log/ (default: the config's directory)\n --config <path> The sidecar's config, checked before anything is printed\n (default: $GIT_BROKER_CONFIG, else ./broker.config.yml)\n --socket-dir <path> Host directory the pushing container already mounts\n --code <path> Run code mounted from this host directory instead of the installed binary\n (as `stage` exports it); nothing is fetched or built at boot\n --user <uid:gid> UID the sidecar runs as (default: this user)\n --image <name> Base image (default: ghcr.io/code-vaults/gcb-host:<version>)\n --name <name> Service and container name (default: gcb)\n -h, --help Show this help\n";
|
|
35
33
|
/**
|
|
36
34
|
* Run the `compose` command.
|
|
37
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAyBA,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAyBA,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,uDAAuD;AACvD,eAAO,MAAM,QAAQ,aAAa,CAAA;AAsBlC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CA0HzD;AAED,gCAAgC;AAChC,eAAO,MAAM,aAAa,88BAezB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CA6D1D"}
|
package/lib/commands/compose.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The broker runs in its own container with the private key mounted read-only, no published ports,
|
|
5
5
|
* no capabilities and a read-only root filesystem; the only surface it shares with anything else is
|
|
6
|
-
* the socket directory. The
|
|
7
|
-
*
|
|
6
|
+
* the socket directory. The released image contains the package, so there is no checkout to copy
|
|
7
|
+
* and nothing to build on the host.
|
|
8
8
|
*
|
|
9
9
|
* The mount targets are constants from `deployment.ts`, shared with `init --mode sidecar`, so the
|
|
10
10
|
* paths recorded in `broker.config.yml` and the paths this file mounts cannot drift apart.
|
|
@@ -53,14 +53,8 @@ export function renderCompose(input) {
|
|
|
53
53
|
? `# It runs the code mounted read-only from ${input.code}, which is whatever \`stage\` put there —
|
|
54
54
|
# see the STAGED.json beside it for the commit. stage does not install dependencies or build:
|
|
55
55
|
# run \`corepack yarn install\` in that directory first, then the source entry point runs here.`
|
|
56
|
-
: `# The image
|
|
57
|
-
#
|
|
58
|
-
# npx --yes --package '${input.packageSpec}' gcb daemon
|
|
59
|
-
#
|
|
60
|
-
# To avoid depending on the registry at boot, either render this file with --code <directory> to
|
|
61
|
-
# run staged code from a mount, or point --image at an image of your own that already has the
|
|
62
|
-
# package installed, and change \`command\` to the binary in it:
|
|
63
|
-
# ["gcb", "daemon", "--config", "${mountedConfigPath}"]`;
|
|
56
|
+
: `# The image contains gcb-host and the command below runs its installed \`gcb\` binary.
|
|
57
|
+
# To pin a reviewed commit instead, render this file with --code <directory>.`;
|
|
64
58
|
// The egress lines belong to both renders: a --code deployment is a sidecar too, and without them it
|
|
65
59
|
// would carry no proxy variables at all, so the daemon would go direct and hang rather than refuse.
|
|
66
60
|
const egress = `
|
|
@@ -72,23 +66,25 @@ export function renderCompose(input) {
|
|
|
72
66
|
- NODE_USE_ENV_PROXY=1
|
|
73
67
|
# Runtime override: a URL pins a proxy, an empty value goes direct, unset keeps the above.
|
|
74
68
|
- GCB_PROXY=\${GCB_PROXY-default}`;
|
|
75
|
-
const environment =
|
|
76
|
-
|
|
77
|
-
environment:${egress}`
|
|
78
|
-
: `
|
|
79
|
-
environment:
|
|
80
|
-
# npx needs somewhere writable for its cache; /tmp is a tmpfs above.
|
|
81
|
-
- npm_config_cache=/tmp/npm-cache${egress}`;
|
|
69
|
+
const environment = `
|
|
70
|
+
environment:${egress}`;
|
|
82
71
|
// A bind mount for a path that does not exist becomes a directory, and the broker would then read a
|
|
83
72
|
// directory instead of a token — for every action, not only the personal ones. Emit it once `authorize`
|
|
84
|
-
// has written the file, and say what to run until then.
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
// has written the file, and say what to run until then. The lock directory is mounted beside it so
|
|
74
|
+
// the container can serialize a renewal against a host-side `gcb authorize`.
|
|
75
|
+
const token = `${input.dir}/${USER_TOKEN_FILE}`;
|
|
76
|
+
const lock = `${token}.lock`;
|
|
77
|
+
const hasToken = fs.existsSync(token);
|
|
78
|
+
if (hasToken) {
|
|
79
|
+
fs.mkdirSync(lock, { recursive: true, mode: 0o700 });
|
|
80
|
+
}
|
|
81
|
+
const userRefreshMount = hasToken
|
|
82
|
+
? `\n # The authorized person's refresh token: the only secret mounted writable, because GitHub\n # rotates it on every exchange.\n - ${yamlVolume(token, SIDECAR.userTokenPath, 'rw')}\n # The lock directory for that token; both sides must see the same one.\n - ${yamlVolume(lock, `${SIDECAR.userTokenPath}.lock`, 'rw')}`
|
|
87
83
|
: '\n # No user.refresh yet: run `gcb authorize` and render this again. A mount' +
|
|
88
84
|
'\n # for a path that does not exist would become a directory, and the broker would read that.';
|
|
89
85
|
const start = fromCode
|
|
90
86
|
? `exec node --conditions=development ${CODE_DIR}/packages/host/bin/gcb.js daemon --config ${mountedConfigArg}`
|
|
91
|
-
: `exec
|
|
87
|
+
: `exec gcb daemon --config ${mountedConfigArg}`;
|
|
92
88
|
const command = ` - sh
|
|
93
89
|
- -c
|
|
94
90
|
- |
|
|
@@ -165,11 +161,10 @@ Print a Docker sidecar definition for the broker (to stdout). Pair it with a con
|
|
|
165
161
|
--config <path> The sidecar's config, checked before anything is printed
|
|
166
162
|
(default: $GIT_BROKER_CONFIG, else ./broker.config.yml)
|
|
167
163
|
--socket-dir <path> Host directory the pushing container already mounts
|
|
168
|
-
--code <path> Run code mounted from this host directory instead of
|
|
169
|
-
|
|
164
|
+
--code <path> Run code mounted from this host directory instead of the installed binary
|
|
165
|
+
(as \`stage\` exports it); nothing is fetched or built at boot
|
|
170
166
|
--user <uid:gid> UID the sidecar runs as (default: this user)
|
|
171
|
-
--image <name> Base image (default:
|
|
172
|
-
--package <spec> npm spec to run (default: gcb-host@<version>)
|
|
167
|
+
--image <name> Base image (default: ghcr.io/code-vaults/gcb-host:<version>)
|
|
173
168
|
--name <name> Service and container name (default: gcb)
|
|
174
169
|
-h, --help Show this help
|
|
175
170
|
`;
|
|
@@ -185,6 +180,9 @@ export function runCompose(argv) {
|
|
|
185
180
|
say(COMPOSE_USAGE);
|
|
186
181
|
return 0;
|
|
187
182
|
}
|
|
183
|
+
if (argv.some(argument => argument === '--package' || argument.startsWith('--package='))) {
|
|
184
|
+
fail('--package is not supported; pin the released image with --image instead');
|
|
185
|
+
}
|
|
188
186
|
const explicitConfig = args.value('config');
|
|
189
187
|
const dirArg = args.value('dir');
|
|
190
188
|
const configPath = path.resolve(explicitConfig === undefined
|
|
@@ -224,8 +222,7 @@ export function runCompose(argv) {
|
|
|
224
222
|
configPath: configFile,
|
|
225
223
|
socketDir,
|
|
226
224
|
user,
|
|
227
|
-
image: args.value('image') ??
|
|
228
|
-
packageSpec: args.value('package') ?? `gcb-host@${PACKAGE_VERSION}`,
|
|
225
|
+
image: args.value('image') ?? `ghcr.io/code-vaults/gcb-host:${PACKAGE_VERSION}`,
|
|
229
226
|
name: args.value('name') ?? 'gcb',
|
|
230
227
|
code: args.value('code'),
|
|
231
228
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEtE,OAAO,EACL,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,eAAe,GAChB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,M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"file":"host.d.ts","sourceRoot":"","sources":["../../src/commands/host.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/commands/host.ts"],"names":[],"mappings":"AA2EA,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAiBD,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACzF,OAAO,CAAC,aAAa,CAAC,CA2GxB;AAED,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB,8oDAwB7B,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAO1F;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAkN5E"}
|