Skip to content

Add db cli for registering workloads and DT projects#45

Open
lukpueh wants to merge 1 commit into
eclipse-csi:mainfrom
lukpueh:db-cli
Open

Add db cli for registering workloads and DT projects#45
lukpueh wants to merge 1 commit into
eclipse-csi:mainfrom
lukpueh:db-cli

Conversation

@lukpueh
Copy link
Copy Markdown
Contributor

@lukpueh lukpueh commented May 12, 2026

Adds a pia console entry point with two subcommands:

  pia add-workload <ef_project_id> <url>
  pia add-dt-project <ef_project_id> <dt_url> <parent_name> <project_name>

add-workload accepts a GitHub repo URL (creates a GitHubWorkload, looking up the owner id via the GitHub API), or a URL prefixed with the Jenkins issuer prefix (creates a JenkinsWorkload). add-dt-project resolves a DependencyTrack root/child project pair by name and stores its UUID.

Notes on remote access

  • Pia DB write access via PIA_DATABASE_URL, e.g. postgresql://user:secret@localhost:5432/pia
  • GitHub API calls are not authenticated
  • DT API access requires a PIA_DEPENDENCY_TRACK_API_KEY with VIEW_PORTFOLIO permission.

Documented in DESIGN.md section 5.5.

Adds a `pia` console entry point with two subcommands:

  pia add-workload <ef_project_id> <url>
  pia add-dt-project <ef_project_id> <dt_url> <parent_name> <project_name>

`add-workload` accepts a GitHub repo URL (creates a GitHubWorkload, looking
up the owner id via the GitHub API), or a URL prefixed with the Jenkins
issuer prefix (creates a JenkinsWorkload). `add-dt-project` resolves a
DependencyTrack root/child project pair by name and stores its UUID.

**Notes on remote access**
* Pia DB write access via PIA_DATABASE_URL, e.g.
`postgresql://user:secret@localhost:5432/pia `
* GitHub API calls are not authenticated
* DT API access requires a PIA_DEPENDENCY_TRACK_API_KEY with
  VIEW_PORTFOLIO permission.

Documented in DESIGN.md section 5.5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Lukas Puehringer <lukas.puehringer@eclipse-foundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants