feat: add local repository type with repo_type field #49

Merged
benvin merged 2 commits from benvin/local-terraform-registry into master 2026-06-22 23:52:21 +10:00
Owner

Introduces repo_type (remote/local) as a separate axis from package_type
so that any package type can be hosted locally. A terraform local repo
is package_type=terraform + repo_type=local.

  • Remote model gains RepoType field (defaults to "remote")
  • Database schema adds repo_type column with migration for existing DBs
  • V1 proxy adds /api/v1/local/{name}/* route for serving local files
  • V2 upload via PUT /api/v2/remotes/{name}/files/{ns}/{type}/{file}.zip
    validates filename matches terraform-provider-{type}{ver}{os}_{arch}.zip
    and returns 409 on duplicate (no overwrites)
  • index.json and {version}.json are computed on-the-fly from uploaded zips
    rather than stored as separate files
  • V2 create validates repo_type and requires base_url only for remotes
Introduces repo_type (remote/local) as a separate axis from package_type so that any package type can be hosted locally. A terraform local repo is package_type=terraform + repo_type=local. - Remote model gains RepoType field (defaults to "remote") - Database schema adds repo_type column with migration for existing DBs - V1 proxy adds /api/v1/local/{name}/* route for serving local files - V2 upload via PUT /api/v2/remotes/{name}/files/{ns}/{type}/{file}.zip validates filename matches terraform-provider-{type}_{ver}_{os}_{arch}.zip and returns 409 on duplicate (no overwrites) - index.json and {version}.json are computed on-the-fly from uploaded zips rather than stored as separate files - V2 create validates repo_type and requires base_url only for remotes
benvin added 1 commit 2026-06-22 23:23:52 +10:00
Introduces repo_type (remote/local) as a separate axis from package_type
so that any package type can be hosted locally. A terraform local repo
is package_type=terraform + repo_type=local.

- Remote model gains RepoType field (defaults to "remote")
- Database schema adds repo_type column with migration for existing DBs
- V1 proxy adds /api/v1/local/{name}/* route for serving local files
- V2 upload via PUT /api/v2/remotes/{name}/files/{ns}/{type}/{file}.zip
  validates filename matches terraform-provider-{type}_{ver}_{os}_{arch}.zip
  and returns 409 on duplicate (no overwrites)
- index.json and {version}.json are computed on-the-fly from uploaded zips
  rather than stored as separate files
- V2 create validates repo_type and requires base_url only for remotes
unkinben added 1 commit 2026-06-22 23:48:30 +10:00
Merge branch 'master' into benvin/local-terraform-registry
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
7f569cdcdc
unkinben force-pushed benvin/local-terraform-registry from 756846c0ba to 7f569cdcdc 2026-06-22 23:48:30 +10:00 Compare
benvin merged commit 1e91a5fb72 into master 2026-06-22 23:52:21 +10:00
benvin deleted branch benvin/local-terraform-registry 2026-06-22 23:52:21 +10:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#49