Skip to content

Slice 6: gated Splunkbase publish in reusable release workflow - #4

Merged
pbujna-apius merged 1 commit into
mainfrom
slice-6-splunkbase-publish
Jul 20, 2026
Merged

Slice 6: gated Splunkbase publish in reusable release workflow#4
pbujna-apius merged 1 commit into
mainfrom
slice-6-splunkbase-publish

Conversation

@pbujna-apius

Copy link
Copy Markdown
Contributor

Implements issue apius-tech/splunk-app-standards#6 (ADR-0006): add an automated Splunkbase publish that runs after the GitHub Release, behind the caller's splunkbase Environment approval gate.

Changes (release.yml only)

New workflow_call inputs:

  • splunkbase_app_id (default "") — numeric Splunkbase listing id.
  • splunk_versions (default 9.0,9.1,9.2,9.3,9.4) — Release API splunk_versions.
  • cim_versions (default "") — optional cim_versions, omitted when empty.
  • visibility (default "true") — Release API visibility flag.

New splunkbase job:

  • needs: release — runs after the GitHub Release job.
  • environment: splunkbase — resolved against the caller repo; its required reviewer is the manual gate, and publish credentials are scoped there.
  • if: inputs.splunkbase_app_id != '' — skips the whole job (and the approval prompt) when no listing exists, so the pipeline stays green and the first publish stays manual.
  • Rebuilds the package with the splunk_app_ci tooling, then POST /api/v1/app/<id>/new_release/ (HTTP Basic auth; multipart files[], filename, splunk_versions, visibility, optional cim_versions) once, and polls /api/v1/package/<pkg_id>/ until pass/fail. Upload is never retried (<=20 POST/hour limit).

AppInspect and GitHub-Release logic are unchanged.

Verification

  • yaml.safe_load passes for the workflow; bash -n passes for all embedded scripts.
  • Not run end-to-end: no Splunkbase API call and no release/tag were made. Real verification is a human-approved 1.0.2 release later.

API field names/endpoints sourced from the Splunkbase Release API reference (https://dev.splunk.com/enterprise/reference/splunkbase/sbreleaseapiref/).

Implements slice #6 (ADR-0006): after the GitHub Release, publish the same
package to Splunkbase behind a manual approval gate.

New reusable inputs (workflow_call):
- splunkbase_app_id (default ""): numeric Splunkbase listing id. Empty skips
  the publish so an app with no listing yet stays green and its first publish
  remains manual.
- splunk_versions (default "9.0,9.1,9.2,9.3,9.4"): Release API `splunk_versions`.
- cim_versions (default ""): optional `cim_versions`, omitted when empty.
- visibility (default "true"): Release API `visibility` flag.

New `splunkbase` job:
- needs: release, so it runs only after the GitHub Release job.
- environment: splunkbase, resolved against the caller repo; its required
  reviewer is the manual gate and publish creds are scoped there.
- Job-level `if: inputs.splunkbase_app_id != ''` skips the whole job (and its
  approval prompt) when no listing exists, keeping the pipeline green.
- Rebuilds the package with the same splunk_app_ci tooling, then uploads via
  POST /api/v1/app/<id>/new_release/ (HTTP Basic auth, multipart files[] +
  filename + splunk_versions + visibility [+ cim_versions]) exactly once to
  respect the <=20 POST/hour limit, and polls the read-only
  /api/v1/package/<pkg_id>/ status endpoint until pass/fail.

AppInspect and GitHub-Release logic are unchanged.
@pbujna-apius
pbujna-apius requested a review from a team as a code owner July 20, 2026 12:43
@pbujna-apius
pbujna-apius merged commit cde55c8 into main Jul 20, 2026
1 check passed
@pbujna-apius
pbujna-apius deleted the slice-6-splunkbase-publish branch July 20, 2026 12:47
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.

1 participant