Skip to main content

Gitlab Datastore Bootstrap

@webframp/gitlab-datastore-bootstrapv2026.08.28.1· 13d agoMODELSWORKFLOWS
01README

One-shot bootstrap for @webframp/gitlab-datastore. Validates access to a GitLab project, optionally creates a scoped project access token, and switches the current swamp repository to use GitLab's Terraform state API as the datastore backend.

Useful as a zero-infrastructure PoC: if you already have a GitLab project, this gives you a shared datastore with distributed locking in under a minute.

Prerequisites

  • A GitLab project (GitLab.com or self-hosted) with API access
  • A personal access token with api scope (or Maintainer access to create a project access token)

Running

swamp extension pull @webframp/gitlab-datastore-bootstrap

swamp model create @webframp/gitlab-datastore-bootstrap/provisioner \
  swamp-gitlab-provisioner

swamp model create command/shell swamp-gitlab-setup

swamp workflow run @webframp/bootstrap-gitlab-datastore \
  --input project_id=12345 \
  --input token=glpat-xxxxxxxxxxxxxxxxxxxx

swamp datastore status
02Release Notes

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.27.1

Changed: Test suite now builds its method context from the shared createModelTestContext factory in @systeminit/swamp-testing instead of a hand-rolled context, wrapping writeResource to preserve the existing assertion API. No behavioral, schema, or method changes — the published provisioner is unchanged. The deno.json gains a dev-only @systeminit/swamp-testing import-map entry and its check task now type-checks the test file.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

03Models1
@webframp/gitlab-datastore-bootstrap/provisionerv2026.08.28.1provisioner.ts
fn provision()
Validate GitLab project access, optionally create a project access token, and produce @webframp/gitlab-datastore configuration.

Resources

state(infinite)— GitLab project validation and datastore configuration for swamp.
04Workflows1
@webframp/bootstrap-gitlab-datastoree1a3b5c7-d9f2-4a6b-8e0c-3f5a7b9d1e2f

Validate access to a GitLab project, optionally create a project access token, and switch the current repo to use GitLab's Terraform state API as the swamp datastore.

validateValidate GitLab project access and prepare configuration.
1.provisionswamp-gitlab-provisioner.provision— Validate project, optionally create token, produce config. Instance `swamp-gitlab-provisioner` must be pre-created with globalArguments wired to the workflow inputs.
configurePoint this repo's datastore at GitLab.
1.run-setupswamp-gitlab-setup.execute— Run `swamp datastore setup extension @webframp/gitlab-datastore`.
05Previous Versions10
2026.08.27.1

2026.08.27.1

Changed: Test suite now builds its method context from the shared createModelTestContext factory in @systeminit/swamp-testing instead of a hand-rolled context, wrapping writeResource to preserve the existing assertion API. No behavioral, schema, or method changes — the published provisioner is unchanged. The deno.json gains a dev-only @systeminit/swamp-testing import-map entry and its check task now type-checks the test file.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.3

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.1

2026.08.26.1

Changed: Normalized deno.json configuration for repo-wide consistency: added explicit compilerOptions.strict and migrated zod dependency to the import map (bare "zod" specifier instead of inline npm:zod@4.4.3). No behavioral changes — runtime resolution is identical.

2026.08.25.1

2026.08.25.1

Changed: Updated labels for improved extension discoverability. Added cross-cutting category labels (security, observability, finops, infrastructure, networking, compliance, devops, ai, incident-response) where applicable.

updated labels

2026.08.24.1

2026.08.24.1

Added: Output metadata attributes for observability.

  • durationMs: Method execution duration in milliseconds.
  • collectedBy: Extension name that produced the data.
  • fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.23.1

2026.08.23.1

Changed: Documentation only — no code changes. Added a ## Troubleshooting section covering the 401/404 branches in validateProject, the 403 branch in verifyStateAccess (needs api scope plus Developer role), JSON-parse failures from gitlabApi when self-hosted instances return HTML instead of JSON (wrong base_url or a login redirect), and the Maintainer-role requirement in createProjectToken (which always requests Developer-level tokens regardless of caller role).

2026.08.21.1

2026.08.21.1

Changed: A malformed (non-JSON) response body from the GitLab API — e.g. an HTML error page from a proxy in front of a self-hosted instance — now raises a clear error naming the request method, path, and HTTP status, instead of a raw JSON.parse SyntaxError with no indication of which request failed.

2026.08.02.1

Fixed: The configure job in @webframp/bootstrap-gitlab-datastore failed with Invalid expression: No such key: attributes. The workflow queried data.latest("swamp-gitlab-provisioner", "state"), but the provisioner writes its resource under the instance name "main" (via writeResource("state", "main", ...)) — data.latest()'s second argument matches the resource's instance name, not its spec name. The configure job now queries data.latest("swamp-gitlab-provisioner", "main"), which resolves correctly.

Changed: The run-setup step now passes the provisioner's datastoreConfig through a DATASTORE_CONFIG environment variable instead of interpolating it directly into a single-quoted shell string. The prior pattern could allow a config value containing a single quote to break out of shell quoting.

Upgrade note: No action needed beyond swamp extension pull — the workflow file is re-pulled with the extension.

2026.08.02.1

2026.08.02.1

Fixed: The configure job in @webframp/bootstrap-gitlab-datastore failed with Invalid expression: No such key: attributes. The workflow queried data.latest("swamp-gitlab-provisioner", "state"), but the provisioner writes its resource under the instance name "main" (via writeResource("state", "main", ...)) — data.latest()'s second argument matches the resource's instance name, not its spec name. The configure job now queries data.latest("swamp-gitlab-provisioner", "main"), which resolves correctly.

Changed: The run-setup step now passes the provisioner's datastoreConfig through a DATASTORE_CONFIG environment variable instead of interpolating it directly into a single-quoted shell string. The prior pattern could allow a config value containing a single quote to break out of shell quoting.

Upgrade note: No action needed beyond swamp extension pull — the workflow file is re-pulled with the extension.

2026.07.27.1

2026.07.27.1

Fixed: The fmt task ran deno fmt --check, so deno task fmt verified formatting instead of applying it and there was no way to format the extension through its own task. fmt now formats and a new fmt:check verifies, matching every other extension in the repository.

Changed: Reformatted files that had drifted from deno fmt. No code behavior changes.

Fixed: deno fmt no longer inspects CLAUDE.md / AGENTS.md. Those files are gitignored and never present in CI, but deno fmt does not read .gitignore, so deno task fmt:check could fail locally on a file CI does not have.

Upgrade note: Tooling and formatting only. No model, method, schema, or behavior change — nothing to do on upgrade.

2026.07.22.1
06Stats
A
100 / 100
Downloads
1
Archive size
13.3 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
07Platforms
08Labels