Slice 6: gated Splunkbase publish in reusable release workflow - #4
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
splunkbaseEnvironment approval gate.Changes (release.yml only)
New
workflow_callinputs:splunkbase_app_id(default"") — numeric Splunkbase listing id.splunk_versions(default9.0,9.1,9.2,9.3,9.4) — Release APIsplunk_versions.cim_versions(default"") — optionalcim_versions, omitted when empty.visibility(default"true") — Release APIvisibilityflag.New
splunkbasejob: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.splunk_app_citooling, thenPOST /api/v1/app/<id>/new_release/(HTTP Basic auth; multipartfiles[],filename,splunk_versions,visibility, optionalcim_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_loadpasses for the workflow;bash -npasses for all embedded scripts.1.0.2release later.API field names/endpoints sourced from the Splunkbase Release API reference (https://dev.splunk.com/enterprise/reference/splunkbase/sbreleaseapiref/).