Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@ jobs:
include:
- provider_dir: providers/setup-kubectl
runs_on: ubuntu-latest
provider_name: tinx-setup-kubectl
main: ./cmd/tinx-provider-kubectl
provider_name: kiox-setup-kubectl
main: ./cmd/kiox-provider-kubectl
tool: kubectl
smoke_command: kubectl version --client -o json
kubectl_version: v1.30.6
- provider_dir: providers/setup-azure-cli
runs_on: macos-latest
provider_name: tinx-setup-azure-cli
main: ./cmd/tinx-provider-azure-cli
provider_name: kiox-setup-azure-cli
main: ./cmd/kiox-provider-azure-cli
tool: az
smoke_command: az version --output json
azure_cli_version: 2.85.0
- provider_dir: providers/setup-helm
runs_on: ubuntu-latest
provider_name: tinx-setup-helm
main: ./cmd/tinx-provider-helm
provider_name: kiox-setup-helm
main: ./cmd/kiox-provider-helm
tool: helm
smoke_command: helm version --template '{{ .Version }}'
helm_version: v4.1.4
- provider_dir: providers/setup-kustomize
runs_on: ubuntu-latest
provider_name: tinx-setup-kustomize
main: ./cmd/tinx-provider-kustomize
provider_name: kiox-setup-kustomize
main: ./cmd/kiox-provider-kustomize
tool: kustomize
smoke_command: kustomize version
kustomize_version: v5.8.1
- provider_dir: providers/setup-terraform
runs_on: ubuntu-latest
provider_name: tinx-setup-terraform
main: ./cmd/tinx-provider-terraform
provider_name: kiox-setup-terraform
main: ./cmd/kiox-provider-terraform
tool: terraform
smoke_command: terraform version -json
terraform_version: 1.14.8
- provider_dir: providers/setup-gcloud
runs_on: ubuntu-latest
provider_name: tinx-setup-gcloud
main: ./cmd/tinx-provider-gcloud
provider_name: kiox-setup-gcloud
main: ./cmd/kiox-provider-gcloud
tool: gcloud
smoke_command: gcloud version --format=json
gcloud_version: 565.0.0
Expand All @@ -67,7 +67,7 @@ jobs:
run: go test ./...

- name: Validate release build
uses: sourceplane/tinx-release-action@v2
uses: sourceplane/kiox-release-action@v2
with:
working-directory: ${{ matrix.provider_dir }}
manifest: provider.yaml
Expand All @@ -77,7 +77,7 @@ jobs:
tag: ci

- name: Smoke test transient providers
uses: sourceplane/tinx-action@v2
uses: sourceplane/kiox-action@v2
env:
KUBECTL_VERSION: ${{ matrix.kubectl_version }}
AZURE_CLI_VERSION: ${{ matrix.azure_cli_version }}
Expand All @@ -92,7 +92,7 @@ jobs:
run: ${{ matrix.smoke_command }}

- name: Smoke test workspace manifest
uses: sourceplane/tinx-action@v2
uses: sourceplane/kiox-action@v2
env:
KUBECTL_VERSION: ${{ matrix.kubectl_version }}
AZURE_CLI_VERSION: ${{ matrix.azure_cli_version }}
Expand All @@ -102,5 +102,5 @@ jobs:
GCLOUD_VERSION: ${{ matrix.gcloud_version }}
with:
working-directory: ${{ matrix.provider_dir }}
workspace: examples/workspace.local.tinx.yaml
workspace: examples/workspace.local.kiox.yaml
run: ${{ matrix.smoke_command }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:

provider_slug="${provider_dir#providers/}"
tool_name="${provider_slug#setup-}"
provider_name="tinx-${provider_slug}"
main="./cmd/tinx-provider-${tool_name}"
provider_name="kiox-${provider_slug}"
main="./cmd/kiox-provider-${tool_name}"
owner=$(printf '%s' "$GITHUB_REPOSITORY_OWNER" | tr '[:upper:]' '[:lower:]')
push_ref="ghcr.io/${owner}/${provider_name}:${tag}"

Expand All @@ -61,7 +61,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Release provider
uses: sourceplane/tinx-release-action@v2
uses: sourceplane/kiox-release-action@v2
with:
working-directory: ${{ steps.meta.outputs.provider_dir }}
manifest: provider.yaml
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# tinx-providers
# kiox-providers

Monorepo for Tinx providers built around the current normalized package model.
Monorepo for Kiox providers built around the current normalized package model.

## Layout

- `internal/installutil`: Shared archive, download, and checksum helpers used by provider installers.
- `providers/setup-azure-cli`: Tinx provider for `az`, backed by a bundled Go installer.
- `providers/setup-gcloud`: Tinx provider for `gcloud`, backed by a bundled Go installer that materializes the Cloud SDK.
- `providers/setup-helm`: Tinx provider for `helm`, backed by a bundled Go installer.
- `providers/setup-kustomize`: Tinx provider for `kustomize`, backed by a bundled Go installer.
- `providers/setup-kubectl`: Tinx provider for `kubectl`, backed by a bundled Go installer.
- `providers/setup-terraform`: Tinx provider for `terraform`, backed by a bundled Go installer.
- `providers/setup-azure-cli`: Kiox provider for `az`, backed by a bundled Go installer.
- `providers/setup-gcloud`: Kiox provider for `gcloud`, backed by a bundled Go installer that materializes the Cloud SDK.
- `providers/setup-helm`: Kiox provider for `helm`, backed by a bundled Go installer.
- `providers/setup-kustomize`: Kiox provider for `kustomize`, backed by a bundled Go installer.
- `providers/setup-kubectl`: Kiox provider for `kubectl`, backed by a bundled Go installer.
- `providers/setup-terraform`: Kiox provider for `terraform`, backed by a bundled Go installer.

## Common flows

Expand All @@ -19,35 +19,35 @@ Validate a provider:
```bash
cd providers/<provider>
go test ./...
tinx release --manifest provider.yaml --main ./cmd/tinx-provider-<tool> --dist dist --output oci --tag validate
kiox release --manifest provider.yaml --main ./cmd/kiox-provider-<tool> --dist dist --output oci --tag validate
```

Publish a provider:

```bash
tinx release --manifest provider.yaml --main ./cmd/tinx-provider-<tool> --dist dist --output oci --tag v0.1.0 --push ghcr.io/<org>/tinx-setup-<tool>:v0.1.0
kiox release --manifest provider.yaml --main ./cmd/kiox-provider-<tool> --dist dist --output oci --tag v0.1.0 --push ghcr.io/<org>/kiox-setup-<tool>:v0.1.0
```

Run a local workspace check:

```bash
workspace_dir=$(mktemp -d)
cat > "$workspace_dir/tinx.yaml" <<EOF
apiVersion: tinx.io/v1
cat > "$workspace_dir/kiox.yaml" <<EOF
apiVersion: kiox.io/v1
kind: Workspace
workspace: demo
providers:
helm:
source: $(pwd)/providers/setup-helm/oci
EOF

tinx init "$workspace_dir/tinx.yaml"
HELM_VERSION=v4.1.4 tinx -w "$workspace_dir" exec -- helm version --template '{{ .Version }}'
kiox init "$workspace_dir/kiox.yaml"
HELM_VERSION=v4.1.4 kiox -w "$workspace_dir" exec -- helm version --template '{{ .Version }}'
```

## CI model

The GitHub Actions setup is intentionally minimal:

- `ci.yml` runs a provider matrix over every checked-in provider on the runner each provider requires, executes `go test`, validates `tinx release` with `sourceplane/tinx-release-action@v2`, and smoke-tests both transient providers and workspace manifests through `sourceplane/tinx-action@v2`.
- `release.yml` publishes any provider tagged as `providers/<provider>/v*` with `sourceplane/tinx-release-action@v2`.
- `ci.yml` runs a provider matrix over every checked-in provider on the runner each provider requires, executes `go test`, validates `kiox release` with `sourceplane/kiox-release-action@v2`, and smoke-tests both transient providers and workspace manifests through `sourceplane/kiox-action@v2`.
- `release.yml` publishes any provider tagged as `providers/<provider>/v*` with `sourceplane/kiox-release-action@v2`.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/sourceplane/tinx-providers
module github.com/sourceplane/kiox-providers

go 1.23.0
8 changes: 4 additions & 4 deletions internal/installutil/installutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ func ResolveTargetPath(targetBin, installDir, toolName, goos string) (string, er
}

if strings.TrimSpace(installDir) == "" {
return "", errors.New("TINX_TARGET_TOOL_INSTALL_DIR or TINX_TARGET_TOOL_BIN must be set")
return "", errors.New("KIOX_TARGET_TOOL_INSTALL_DIR or KIOX_TARGET_TOOL_BIN must be set")
}

targetPath := filepath.Join(strings.TrimSpace(installDir), "bin", ExecutableName(toolName, goos))
return filepath.Abs(targetPath)
}

func ResolveCacheDir(explicitCacheDir, tinxHome string, segments ...string) (string, error) {
func ResolveCacheDir(explicitCacheDir, kioxHome string, segments ...string) (string, error) {
if trimmed := strings.TrimSpace(explicitCacheDir); trimmed != "" {
return filepath.Abs(trimmed)
}

base := strings.TrimSpace(tinxHome)
base := strings.TrimSpace(kioxHome)
if base == "" {
homeDir, err := os.UserHomeDir()
if err != nil {
return "", fmt.Errorf("resolve home directory: %w", err)
}
base = filepath.Join(homeDir, ".tinx")
base = filepath.Join(homeDir, ".kiox")
}

parts := append([]string{base, "cache", "providers"}, segments...)
Expand Down
30 changes: 15 additions & 15 deletions prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ gpt54m "
You are a senior platform engineer building CNCF-grade tooling.

Goal:
Create a production-ready Tinx provider that replicates the behavior of a GitHub Action setup tool but follows Tinx architecture (provider + runtime + workspace separation).
Create a production-ready Kiox provider that replicates the behavior of a GitHub Action setup tool but follows Kiox architecture (provider + runtime + workspace separation).

---

## 📌 Context

Tinx Docs:
https://docs.tinx.sourceplane.ai
Kiox Docs:
https://docs.kiox.sourceplane.ai

Reference GHA Action:
{{GHA_REPO_URL}}

Provider Name:
{{TINX_PROVIDER_NAME}}
{{KIOX_PROVIDER_NAME}}

Target Tool:
{{TOOL_NAME}}
Expand All @@ -35,7 +35,7 @@ Go (preferred for portability and static binaries)
- Download/install strategy
- Platform differences (linux/mac/windows)

2. Map this into Tinx concepts:
2. Map this into Kiox concepts:
- Provider schema (inputs/outputs)
- Runtime execution model
- Workspace mutation (files, binaries, env)
Expand All @@ -53,11 +53,11 @@ Go (preferred for portability and static binaries)
Implement:

1. CLI entrypoint:
- tinx-provider-{{TOOL_NAME}}
- kiox-provider-{{TOOL_NAME}}

2. Features:
- Download tool binary securely (HTTPS + checksum validation)
- Extract/install to workspace (.tinx/tools/{{tool}})
- Extract/install to workspace (.kiox/tools/{{tool}})
- Add to PATH for workspace runtime
- Support version pinning

Expand All @@ -72,32 +72,32 @@ Implement:

---

## 📦 Phase 3 — Tinx Integration
## 📦 Phase 3 — Kiox Integration

1. Create provider.yaml:
- name: {{TINX_PROVIDER_NAME}}
- name: {{KIOX_PROVIDER_NAME}}
- inputs:
- version
- outputs:
- binary_path

2. Ensure compatibility with:
- tinx workspace
- tinx runtime execution
- kiox workspace
- kiox runtime execution

3. Follow k8s-style declarative schema (CRD-like)

---

## 🧪 Phase 4 — Local Testing

1. Install tinx locally:
curl -fsSL https://raw.githubusercontent.com/sourceplane/tinx/main/install.sh | bash
1. Install kiox locally:
curl -fsSL https://raw.githubusercontent.com/sourceplane/kiox/main/install.sh | bash

2. Create test workspace

3. Run:
tinx apply -f provider.yaml
kiox apply -f provider.yaml

4. Validate:
- binary exists
Expand All @@ -120,7 +120,7 @@ Implement:

## 🚀 Phase 6 — Enhancements

- Add caching layer (~/.tinx/cache)
- Add caching layer (~/.kiox/cache)
- Add semantic version resolution
- Add fallback mirrors (GitHub releases, official mirrors)
- Add logging + debug mode
Expand Down
Loading
Loading