diff --git a/.github/workflows/provider-ghcr-e2e.yml b/.github/workflows/provider-ghcr-e2e.yml index 1a9e8a2..95acea0 100644 --- a/.github/workflows/provider-ghcr-e2e.yml +++ b/.github/workflows/provider-ghcr-e2e.yml @@ -1,6 +1,7 @@ name: provider-ghcr-e2e on: + pull_request: push: branches: - main @@ -12,7 +13,32 @@ permissions: jobs: push-install-run: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - provider: echo-provider + alias: echo + provider_ref: sourceplane/echo-provider + release_repo: kiox-echo-provider + main_package: ./cmd/echo-provider + - provider: multi-tool-provider + alias: echo + provider_ref: acme/multi-tool-provider + release_repo: kiox-multi-tool-provider + main_package: "" + - provider: inline-tool-provider + alias: inline + provider_ref: acme/inline-tool-provider + release_repo: kiox-inline-tool-provider + main_package: "" + - provider: setup-kubectl + alias: setup-kubectl + provider_ref: acme/setup-kubectl + release_repo: kiox-setup-kubectl + main_package: "" steps: - name: Checkout uses: actions/checkout@v4 @@ -31,7 +57,7 @@ jobs: id: vars run: | owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]') - echo "ref=ghcr.io/${owner}/kiox-echo-provider:ci-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> "$GITHUB_OUTPUT" + echo "ref=ghcr.io/${owner}/${{ matrix.release_repo }}:ci-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> "$GITHUB_OUTPUT" - name: Login to GHCR uses: docker/login-action@v3 @@ -40,26 +66,81 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Package and push example provider + - name: Package and push provider + working-directory: testdata/${{ matrix.provider }} env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ./bin/kiox release \ - --manifest testdata/echo-provider/kiox.yaml \ - --main ./cmd/echo-provider \ - --dist testdata/echo-provider/dist \ - --output testdata/echo-provider/oci \ - --push "${{ steps.vars.outputs.ref }}" + args=(release --dist dist --output oci --push "${{ steps.vars.outputs.ref }}") + if [ -n "${{ matrix.main_package }}" ]; then + args+=(--main "${{ matrix.main_package }}") + fi + ../../bin/kiox "${args[@]}" + + - name: Install provider from GHCR + working-directory: testdata/${{ matrix.provider }} + env: + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + home="$RUNNER_TEMP/kiox-home-${{ matrix.provider }}" + ../../bin/kiox --kiox-home "$home" install "${{ steps.vars.outputs.ref }}" + ../../bin/kiox --kiox-home "$home" provider list default | tee "$RUNNER_TEMP/${{ matrix.provider }}-install.out" + grep -q "${{ matrix.provider_ref }}" "$RUNNER_TEMP/${{ matrix.provider }}-install.out" - name: Create workspace and run from GHCR + working-directory: testdata/${{ matrix.provider }} env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - cd testdata/echo-provider - workspace_root="$RUNNER_TEMP/kiox-workspace" - ../../bin/kiox --kiox-home "$RUNNER_TEMP/kiox-home" init "$workspace_root" - ../../bin/kiox --kiox-home "$RUNNER_TEMP/kiox-home" --workspace "$workspace_root" add "${{ steps.vars.outputs.ref }}" as echo - ../../bin/kiox --kiox-home "$RUNNER_TEMP/kiox-home" --workspace "$workspace_root" -- echo plan --intent "$PWD/intent.yaml" | tee "$RUNNER_TEMP/echo-run.out" - grep -q "capability=plan" "$RUNNER_TEMP/echo-run.out" + workspace_root="$RUNNER_TEMP/${{ matrix.provider }}-workspace" + home="$RUNNER_TEMP/kiox-home-${{ matrix.provider }}" + ../../bin/kiox --kiox-home "$home" init "$workspace_root" + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" add "${{ steps.vars.outputs.ref }}" as "${{ matrix.alias }}" + + case "${{ matrix.provider }}" in + echo-provider) + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- echo plan --intent "$PWD/intent.yaml" | tee "$RUNNER_TEMP/echo-run.out" + grep -q 'capability=plan' "$RUNNER_TEMP/echo-run.out" + ;; + multi-tool-provider) + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- echo one two | tee "$RUNNER_TEMP/multi-run.out" + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- echo-tool alpha beta | tee "$RUNNER_TEMP/multi-tool-run.out" + grep -q 'normalized-env=hello-normalized' "$RUNNER_TEMP/multi-run.out" + grep -q 'normalized-args=one two' "$RUNNER_TEMP/multi-run.out" + grep -q 'normalized-args=alpha beta' "$RUNNER_TEMP/multi-tool-run.out" + ;; + inline-tool-provider) + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- inline red blue | tee "$RUNNER_TEMP/inline-run.out" + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- inline-tool green gold | tee "$RUNNER_TEMP/inline-tool-run.out" + grep -q 'inline-env=hello-inline' "$RUNNER_TEMP/inline-run.out" + grep -q 'inline-mode=inline' "$RUNNER_TEMP/inline-run.out" + grep -q 'inline-asset=hello-from-inline-assets' "$RUNNER_TEMP/inline-run.out" + grep -q 'inline-args=red blue' "$RUNNER_TEMP/inline-run.out" + grep -q 'inline-args=green gold' "$RUNNER_TEMP/inline-tool-run.out" + ;; + setup-kubectl) + server_root="$RUNNER_TEMP/kubectl-release" + mkdir -p "$server_root/v1.29.15/bin/linux/amd64" + printf 'v1.29.15\n' > "$server_root/stable.txt" + printf 'v1.29.15\n' > "$server_root/stable-1.29.txt" + printf '%s\n' \ + '#!/bin/sh' \ + 'set -eu' \ + "printf 'kubectl-version=%s\\n' 'v1.29.15'" \ + "printf 'kubectl-args=%s\\n' \"\$*\"" \ + > "$server_root/v1.29.15/bin/linux/amd64/kubectl" + chmod +x "$server_root/v1.29.15/bin/linux/amd64/kubectl" + python3 -m http.server 18080 --bind 127.0.0.1 --directory "$server_root" >/tmp/kubectl-server.log 2>&1 & + server_pid=$! + trap 'kill "$server_pid"' EXIT + curl -fsS --retry 10 --retry-connrefused --retry-delay 1 \ + "http://127.0.0.1:18080/stable-1.29.txt" >/dev/null + KUBECTL_RELEASE_BASE_URL="http://127.0.0.1:18080" KUBECTL_VERSION="1.29" \ + ../../bin/kiox --kiox-home "$home" --workspace "$workspace_root" -- kubectl version --client | tee "$RUNNER_TEMP/kubectl-run.out" + grep -q 'kubectl-version=v1.29.15' "$RUNNER_TEMP/kubectl-run.out" + grep -q 'kubectl-args=version --client' "$RUNNER_TEMP/kubectl-run.out" + ;; + esac diff --git a/Makefile b/Makefile index d27d5d3..7f9b932 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ test-core: release-example: build ./$(KIOX_BIN) release \ - --manifest $(ECHO_PROVIDER_DIR)/kiox.yaml \ + --manifest $(ECHO_PROVIDER_DIR)/provider.yaml \ --main ./cmd/echo-provider \ --dist $(ECHO_PROVIDER_DIST) \ --output $(ECHO_PROVIDER_OCI) @@ -61,7 +61,7 @@ e2e-local: run-example ghcr-push: build ./$(KIOX_BIN) release \ - --manifest $(ECHO_PROVIDER_DIR)/kiox.yaml \ + --manifest $(ECHO_PROVIDER_DIR)/provider.yaml \ --main ./cmd/echo-provider \ --dist $(ECHO_PROVIDER_DIST) \ --output $(ECHO_PROVIDER_OCI) \ diff --git a/README.md b/README.md index c4c6dcc..68d4541 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Build kiox and package the normalized multi-tool fixture: ```bash make build ./bin/kiox release \ - --manifest testdata/multi-tool-provider/kiox.yaml \ + --manifest testdata/multi-tool-provider/provider.yaml \ --dist testdata/multi-tool-provider/dist \ --output testdata/multi-tool-provider/oci ``` diff --git a/TEST_PROVIDERS.md b/TEST_PROVIDERS.md index d535488..f3a8a8d 100644 --- a/TEST_PROVIDERS.md +++ b/TEST_PROVIDERS.md @@ -12,7 +12,7 @@ make build ```bash ./bin/kiox release \ - --manifest testdata/echo-provider/kiox.yaml \ + --manifest testdata/echo-provider/provider.yaml \ --dist testdata/echo-provider/dist \ --output testdata/echo-provider/oci @@ -26,7 +26,7 @@ make build ```bash ./bin/kiox release \ - --manifest testdata/multi-tool-provider/kiox.yaml \ + --manifest testdata/multi-tool-provider/provider.yaml \ --dist testdata/multi-tool-provider/dist \ --output testdata/multi-tool-provider/oci @@ -40,7 +40,7 @@ make build ```bash ./bin/kiox release \ - --manifest testdata/inline-tool-provider/kiox.yaml \ + --manifest testdata/inline-tool-provider/provider.yaml \ --dist testdata/inline-tool-provider/dist \ --output testdata/inline-tool-provider/oci @@ -54,7 +54,7 @@ make build ```bash ./bin/kiox release \ - --manifest testdata/setup-kubectl/kiox.yaml \ + --manifest testdata/setup-kubectl/provider.yaml \ --dist testdata/setup-kubectl/dist \ --output testdata/setup-kubectl/oci diff --git a/internal/build/goreleaser_test.go b/internal/build/goreleaser_test.go index d670b4b..e1e30ea 100644 --- a/internal/build/goreleaser_test.go +++ b/internal/build/goreleaser_test.go @@ -25,7 +25,7 @@ func TestResolveGoReleaserConfigPrefersExplicitPath(t *testing.T) { func TestResolveGoReleaserConfigGeneratesFromManifest(t *testing.T) { moduleRoot := t.TempDir() - manifestPath := filepath.Join(moduleRoot, "kiox.yaml") + manifestPath := filepath.Join(moduleRoot, "provider.yaml") content := `apiVersion: kiox.io/v1 kind: Provider metadata: diff --git a/internal/cmd/e2e_test.go b/internal/cmd/e2e_test.go index 6c3d310..9649edc 100644 --- a/internal/cmd/e2e_test.go +++ b/internal/cmd/e2e_test.go @@ -23,7 +23,7 @@ func TestReleaseAndInstallLocalLayout(t *testing.T) { releaseBuf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", filepath.Join(providerDir, "oci"), }) @@ -46,7 +46,7 @@ func TestReleaseAndInstallLocalLayout(t *testing.T) { for _, expected := range []string{ filepath.Join(home, "providers", "sourceplane", "echo-provider", "v0.1.0", "metadata.json"), filepath.Join(meta.StorePath, "oci", "index.json"), - filepath.Join(meta.StorePath, "kiox.yaml"), + filepath.Join(meta.StorePath, preferredProviderManifestName), } { if _, err := os.Stat(expected); err != nil { t.Fatalf("expected installed artifact %s: %v", expected, err) @@ -81,7 +81,7 @@ cp dist/bin/darwin/amd64/echo-provider dist/bin/linux/arm64/echo-provider releaseBuf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "artifacts"), "--output", filepath.Join(providerDir, "oci"), "--delegate-goreleaser", @@ -147,7 +147,7 @@ cp dist/bin/darwin/amd64/echo-provider dist/bin/linux/arm64/echo-provider releaseBuf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "artifacts"), "--output", filepath.Join(providerDir, "oci"), "--delegate-goreleaser", @@ -179,7 +179,7 @@ func TestReleasePushAndInstallFromRegistry(t *testing.T) { releaseBuf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", filepath.Join(providerDir, "oci"), "--push", ref, @@ -222,7 +222,7 @@ func TestInstallUsesCachedRemoteProvider(t *testing.T) { releaseBuf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", filepath.Join(providerDir, "oci"), "--push", ref, diff --git a/internal/cmd/list_test.go b/internal/cmd/list_test.go index 03868b9..c3a2096 100644 --- a/internal/cmd/list_test.go +++ b/internal/cmd/list_test.go @@ -260,7 +260,7 @@ func releaseStandaloneProviderLayout(t *testing.T, home, providerDir string) str buf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", layoutPath, }) diff --git a/internal/cmd/workspace_cli_test.go b/internal/cmd/workspace_cli_test.go index dc2126f..1302472 100644 --- a/internal/cmd/workspace_cli_test.go +++ b/internal/cmd/workspace_cli_test.go @@ -521,7 +521,7 @@ func TestDashShortcutReusesCachedTaggedRegistryProvider(t *testing.T) { if err != nil { t.Fatalf("load workspace provider metadata: %v", err) } - for _, path := range []string{filepath.Join(meta.StorePath, "package.json"), filepath.Join(meta.StorePath, "kiox.yaml")} { + for _, path := range []string{filepath.Join(meta.StorePath, "package.json"), filepath.Join(meta.StorePath, preferredProviderManifestName)} { if err := os.Remove(path); err != nil { t.Fatalf("remove cached package file %s: %v", path, err) } @@ -1245,7 +1245,7 @@ func createCapabilityProviderProject(t *testing.T, dir, namespace, name, capabil " description: test capability", "", }, "\n") - if err := os.WriteFile(filepath.Join(dir, "kiox.yaml"), []byte(manifest), 0o644); err != nil { + if err := os.WriteFile(providerManifestPath(dir), []byte(manifest), 0o644); err != nil { t.Fatal(err) } if err := os.WriteFile(filepath.Join(dir, "cmd", name, "main.go"), []byte(mainSource), 0o644); err != nil { @@ -1254,13 +1254,17 @@ func createCapabilityProviderProject(t *testing.T, dir, namespace, name, capabil return dir } +func providerManifestPath(providerDir string) string { + return filepath.Join(providerDir, preferredProviderManifestName) +} + func releaseProviderLayout(t *testing.T, home, providerDir string) string { t.Helper() layoutPath := filepath.Join(providerDir, "oci") buf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", layoutPath, }) @@ -1272,7 +1276,7 @@ func releaseProviderLayout(t *testing.T, home, providerDir string) string { func setProviderVersion(t *testing.T, providerDir, version string) { t.Helper() - manifestPath := filepath.Join(providerDir, "kiox.yaml") + manifestPath := providerManifestPath(providerDir) data, err := os.ReadFile(manifestPath) if err != nil { t.Fatal(err) @@ -1291,7 +1295,7 @@ func releaseProviderRef(t *testing.T, home, providerDir, ref string) { buf := runRootCommand(t, []string{ "--kiox-home", home, "release", - "--manifest", filepath.Join(providerDir, "kiox.yaml"), + "--manifest", providerManifestPath(providerDir), "--dist", filepath.Join(providerDir, "dist"), "--output", filepath.Join(providerDir, "oci"), "--push", ref, diff --git a/internal/manifest/provider_test.go b/internal/manifest/provider_test.go index fd99980..ff98912 100644 --- a/internal/manifest/provider_test.go +++ b/internal/manifest/provider_test.go @@ -9,7 +9,7 @@ import ( func TestLoadProvider(t *testing.T) { dir := t.TempDir() - path := filepath.Join(dir, "kiox.yaml") + path := filepath.Join(dir, "provider.yaml") content := strings.Join([]string{ "apiVersion: kiox.io/v1", "kind: Provider", @@ -56,7 +56,7 @@ func TestLoadProvider(t *testing.T) { func TestLoadProviderRequiresPlatforms(t *testing.T) { dir := t.TempDir() - path := filepath.Join(dir, "kiox.yaml") + path := filepath.Join(dir, "provider.yaml") content := `apiVersion: kiox.io/v1 kind: Provider metadata: diff --git a/internal/oci/layout.go b/internal/oci/layout.go index f0006c1..27359ba 100644 --- a/internal/oci/layout.go +++ b/internal/oci/layout.go @@ -26,7 +26,11 @@ import ( "github.com/sourceplane/kiox/internal/ui/progress" ) -const layoutVersion = "1.0.0" +const ( + layoutVersion = "1.0.0" + providerManifestFileName = "provider.yaml" + legacyProviderManifestFileName = "kiox.yaml" +) type imageIndex struct { SchemaVersion int `json:"schemaVersion"` @@ -89,7 +93,11 @@ func Pack(opts PackOptions) (PackResult, error) { if err != nil { return PackResult{}, err } - providerManifestDesc, err := writeBlob(opts.OutputDir, manifestBytes, MediaTypeManifest, map[string]string{"org.opencontainers.image.title": "kiox.yaml"}) + manifestTitle := filepath.Base(opts.ManifestPath) + if strings.TrimSpace(manifestTitle) == "" { + manifestTitle = providerManifestFileName + } + providerManifestDesc, err := writeBlob(opts.OutputDir, manifestBytes, MediaTypeManifest, map[string]string{"org.opencontainers.image.title": manifestTitle}) if err != nil { return PackResult{}, err } @@ -198,7 +206,7 @@ func installMetadata(layoutPath, tag, activationHome, storeHome, alias, ref stri return state.ProviderMetadata{}, fmt.Errorf("cache OCI layout: %w", err) } tracker.Info("cache", "cached OCI blobs") - if err := os.WriteFile(filepath.Join(storeRoot, "kiox.yaml"), manifestBytes, 0o644); err != nil { + if err := os.WriteFile(filepath.Join(storeRoot, providerManifestFileName), manifestBytes, 0o644); err != nil { return state.ProviderMetadata{}, fmt.Errorf("cache manifest: %w", err) } if err := os.WriteFile(filepath.Join(storeRoot, "package.json"), metadataBytes, 0o644); err != nil { @@ -802,9 +810,9 @@ func LoadPackageModel(meta state.ProviderMetadata) (core.Package, error) { return layoutPkg, nil } } - manifestBytes, err := os.ReadFile(filepath.Join(storeRoot, "kiox.yaml")) + manifestBytes, err := readCachedProviderManifest(storeRoot) if err != nil { - return pkg, fmt.Errorf("read cached provider manifest: %w", err) + return pkg, err } pkg, err = parser.LoadBytes(manifestBytes) if err != nil { @@ -837,8 +845,22 @@ func backfillCachedPackageFiles(meta state.ProviderMetadata, storeRoot string, m writeMissingCacheFile(filepath.Join(storeRoot, "package.json"), metadataBytes) } if len(manifestBytes) > 0 { - writeMissingCacheFile(filepath.Join(storeRoot, "kiox.yaml"), manifestBytes) + writeMissingCacheFile(filepath.Join(storeRoot, providerManifestFileName), manifestBytes) + } +} + +func readCachedProviderManifest(storeRoot string) ([]byte, error) { + for _, name := range []string{providerManifestFileName, legacyProviderManifestFileName} { + path := filepath.Join(storeRoot, name) + data, err := os.ReadFile(path) + if err == nil { + return data, nil + } + if !os.IsNotExist(err) { + return nil, fmt.Errorf("read cached provider manifest: %w", err) + } } + return nil, fmt.Errorf("read cached provider manifest: %w", os.ErrNotExist) } func writeMissingCacheFile(path string, data []byte) { diff --git a/testdata/echo-provider/oci/blobs/sha256/2dff1df1c90cf2461ab8021dab75ac1135354f92560f96bcfc3a937b2f1e78fd b/testdata/echo-provider/oci/blobs/sha256/072186402d006637b054573874f2d0a7329aefaaa9b977202df6037586e90597 similarity index 86% rename from testdata/echo-provider/oci/blobs/sha256/2dff1df1c90cf2461ab8021dab75ac1135354f92560f96bcfc3a937b2f1e78fd rename to testdata/echo-provider/oci/blobs/sha256/072186402d006637b054573874f2d0a7329aefaaa9b977202df6037586e90597 index 267d407..99ae6a2 100644 Binary files a/testdata/echo-provider/oci/blobs/sha256/2dff1df1c90cf2461ab8021dab75ac1135354f92560f96bcfc3a937b2f1e78fd and b/testdata/echo-provider/oci/blobs/sha256/072186402d006637b054573874f2d0a7329aefaaa9b977202df6037586e90597 differ diff --git a/testdata/echo-provider/kiox.yaml b/testdata/echo-provider/oci/blobs/sha256/3dbbc7b8a603035dbb088a3559c2cecb561ae1b9f28f4d0089c4ec7e90e3b29c similarity index 97% rename from testdata/echo-provider/kiox.yaml rename to testdata/echo-provider/oci/blobs/sha256/3dbbc7b8a603035dbb088a3559c2cecb561ae1b9f28f4d0089c4ec7e90e3b29c index 49faa6e..7cd315c 100644 --- a/testdata/echo-provider/kiox.yaml +++ b/testdata/echo-provider/oci/blobs/sha256/3dbbc7b8a603035dbb088a3559c2cecb561ae1b9f28f4d0089c4ec7e90e3b29c @@ -26,4 +26,4 @@ spec: description: Generate a plan layers: assets: - root: assets + root: assets \ No newline at end of file diff --git a/testdata/echo-provider/oci/blobs/sha256/60e8b670feeed91713a55c8db7aee84d79b10fb22bad3d6c1c5fb0dc7b4369e8 b/testdata/echo-provider/oci/blobs/sha256/46034cf8473bd103b71cd068c081e371fc75fd583ef3ed26f484a4224bb84ba3 similarity index 80% rename from testdata/echo-provider/oci/blobs/sha256/60e8b670feeed91713a55c8db7aee84d79b10fb22bad3d6c1c5fb0dc7b4369e8 rename to testdata/echo-provider/oci/blobs/sha256/46034cf8473bd103b71cd068c081e371fc75fd583ef3ed26f484a4224bb84ba3 index dd07161..5c02813 100644 --- a/testdata/echo-provider/oci/blobs/sha256/60e8b670feeed91713a55c8db7aee84d79b10fb22bad3d6c1c5fb0dc7b4369e8 +++ b/testdata/echo-provider/oci/blobs/sha256/46034cf8473bd103b71cd068c081e371fc75fd583ef3ed26f484a4224bb84ba3 @@ -10,10 +10,10 @@ "layers": [ { "mediaType": "application/vnd.kiox.provider.manifest.v1+yaml", - "digest": "sha256:92844f8772c315b992d38eaa5334593d8c2e310ee38956a80572b4752b6370a9", - "size": 661, + "digest": "sha256:3dbbc7b8a603035dbb088a3559c2cecb561ae1b9f28f4d0089c4ec7e90e3b29c", + "size": 660, "annotations": { - "org.opencontainers.image.title": "kiox.yaml" + "org.opencontainers.image.title": "provider.yaml" } }, { @@ -26,7 +26,7 @@ }, { "mediaType": "application/vnd.kiox.provider.binary.darwin.amd64.v1", - "digest": "sha256:829c6bffefb952e06d100d3f598f245b6c585ca9324612fa9872e5b1bbbcefc7", + "digest": "sha256:f3aba54e65a4aa0744c1bf19942f5019e9f1e91585d42816889aadff9dc3aa46", "size": 1622256, "annotations": { "io.kiox.bundle": "echo-provider", @@ -37,7 +37,7 @@ }, { "mediaType": "application/vnd.kiox.provider.binary.darwin.arm64.v1", - "digest": "sha256:2dff1df1c90cf2461ab8021dab75ac1135354f92560f96bcfc3a937b2f1e78fd", + "digest": "sha256:072186402d006637b054573874f2d0a7329aefaaa9b977202df6037586e90597", "size": 1606418, "annotations": { "io.kiox.bundle": "echo-provider", @@ -48,7 +48,7 @@ }, { "mediaType": "application/vnd.kiox.provider.binary.linux.amd64.v1", - "digest": "sha256:9a5113a56bed51a02f651b776ba2fff93c6cccd81a5f5bf9d7879a88acdf5e28", + "digest": "sha256:54f8cf00c476731da8b1ed3ed8bf5e242b869e60c05da5490280ff2e83c2b2b7", "size": 1511608, "annotations": { "io.kiox.bundle": "echo-provider", @@ -59,7 +59,7 @@ }, { "mediaType": "application/vnd.kiox.provider.binary.linux.arm64.v1", - "digest": "sha256:3f1f729a993f1d5692370615d3dafaee97b9e6cc4004c98de79826cb8cbc38ed", + "digest": "sha256:d9d0a3ad15bce24de16818be95bb9032801d66c9a4026857308362b6f8576900", "size": 1573048, "annotations": { "io.kiox.bundle": "echo-provider", @@ -70,7 +70,7 @@ }, { "mediaType": "application/vnd.kiox.asset.layer.v1+tar", - "digest": "sha256:35df82134d8aa2f4178132cbd3771146fbe2937959b875609e6f111cde2cff45", + "digest": "sha256:92265185032b1b0825031d13323906d509eec4016a13825468d8930df47f8972", "size": 2560, "annotations": { "io.kiox.bundle": "echo-provider", diff --git a/testdata/echo-provider/oci/blobs/sha256/9a5113a56bed51a02f651b776ba2fff93c6cccd81a5f5bf9d7879a88acdf5e28 b/testdata/echo-provider/oci/blobs/sha256/54f8cf00c476731da8b1ed3ed8bf5e242b869e60c05da5490280ff2e83c2b2b7 similarity index 87% rename from testdata/echo-provider/oci/blobs/sha256/9a5113a56bed51a02f651b776ba2fff93c6cccd81a5f5bf9d7879a88acdf5e28 rename to testdata/echo-provider/oci/blobs/sha256/54f8cf00c476731da8b1ed3ed8bf5e242b869e60c05da5490280ff2e83c2b2b7 index 2b7d79c..be9f084 100644 Binary files a/testdata/echo-provider/oci/blobs/sha256/9a5113a56bed51a02f651b776ba2fff93c6cccd81a5f5bf9d7879a88acdf5e28 and b/testdata/echo-provider/oci/blobs/sha256/54f8cf00c476731da8b1ed3ed8bf5e242b869e60c05da5490280ff2e83c2b2b7 differ diff --git a/testdata/echo-provider/oci/blobs/sha256/35df82134d8aa2f4178132cbd3771146fbe2937959b875609e6f111cde2cff45 b/testdata/echo-provider/oci/blobs/sha256/92265185032b1b0825031d13323906d509eec4016a13825468d8930df47f8972 similarity index 95% rename from testdata/echo-provider/oci/blobs/sha256/35df82134d8aa2f4178132cbd3771146fbe2937959b875609e6f111cde2cff45 rename to testdata/echo-provider/oci/blobs/sha256/92265185032b1b0825031d13323906d509eec4016a13825468d8930df47f8972 index 746e3ab..23738b8 100644 Binary files a/testdata/echo-provider/oci/blobs/sha256/35df82134d8aa2f4178132cbd3771146fbe2937959b875609e6f111cde2cff45 and b/testdata/echo-provider/oci/blobs/sha256/92265185032b1b0825031d13323906d509eec4016a13825468d8930df47f8972 differ diff --git a/testdata/echo-provider/oci/blobs/sha256/3f1f729a993f1d5692370615d3dafaee97b9e6cc4004c98de79826cb8cbc38ed b/testdata/echo-provider/oci/blobs/sha256/d9d0a3ad15bce24de16818be95bb9032801d66c9a4026857308362b6f8576900 similarity index 87% rename from testdata/echo-provider/oci/blobs/sha256/3f1f729a993f1d5692370615d3dafaee97b9e6cc4004c98de79826cb8cbc38ed rename to testdata/echo-provider/oci/blobs/sha256/d9d0a3ad15bce24de16818be95bb9032801d66c9a4026857308362b6f8576900 index 6b6a360..f77a366 100644 Binary files a/testdata/echo-provider/oci/blobs/sha256/3f1f729a993f1d5692370615d3dafaee97b9e6cc4004c98de79826cb8cbc38ed and b/testdata/echo-provider/oci/blobs/sha256/d9d0a3ad15bce24de16818be95bb9032801d66c9a4026857308362b6f8576900 differ diff --git a/testdata/echo-provider/oci/blobs/sha256/829c6bffefb952e06d100d3f598f245b6c585ca9324612fa9872e5b1bbbcefc7 b/testdata/echo-provider/oci/blobs/sha256/f3aba54e65a4aa0744c1bf19942f5019e9f1e91585d42816889aadff9dc3aa46 similarity index 89% rename from testdata/echo-provider/oci/blobs/sha256/829c6bffefb952e06d100d3f598f245b6c585ca9324612fa9872e5b1bbbcefc7 rename to testdata/echo-provider/oci/blobs/sha256/f3aba54e65a4aa0744c1bf19942f5019e9f1e91585d42816889aadff9dc3aa46 index 17e2cfc..e122854 100644 Binary files a/testdata/echo-provider/oci/blobs/sha256/829c6bffefb952e06d100d3f598f245b6c585ca9324612fa9872e5b1bbbcefc7 and b/testdata/echo-provider/oci/blobs/sha256/f3aba54e65a4aa0744c1bf19942f5019e9f1e91585d42816889aadff9dc3aa46 differ diff --git a/testdata/echo-provider/oci/index.json b/testdata/echo-provider/oci/index.json index e2ae7e6..4e6866e 100644 --- a/testdata/echo-provider/oci/index.json +++ b/testdata/echo-provider/oci/index.json @@ -4,8 +4,8 @@ "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", - "digest": "sha256:60e8b670feeed91713a55c8db7aee84d79b10fb22bad3d6c1c5fb0dc7b4369e8", - "size": 3242, + "digest": "sha256:46034cf8473bd103b71cd068c081e371fc75fd583ef3ed26f484a4224bb84ba3", + "size": 3246, "annotations": { "org.opencontainers.image.ref.name": "v0.1.0" } diff --git a/testdata/echo-provider/oci/blobs/sha256/92844f8772c315b992d38eaa5334593d8c2e310ee38956a80572b4752b6370a9 b/testdata/echo-provider/provider.yaml similarity index 97% rename from testdata/echo-provider/oci/blobs/sha256/92844f8772c315b992d38eaa5334593d8c2e310ee38956a80572b4752b6370a9 rename to testdata/echo-provider/provider.yaml index 49faa6e..7cd315c 100644 --- a/testdata/echo-provider/oci/blobs/sha256/92844f8772c315b992d38eaa5334593d8c2e310ee38956a80572b4752b6370a9 +++ b/testdata/echo-provider/provider.yaml @@ -26,4 +26,4 @@ spec: description: Generate a plan layers: assets: - root: assets + root: assets \ No newline at end of file diff --git a/testdata/inline-tool-provider/kiox.yaml b/testdata/inline-tool-provider/provider.yaml similarity index 100% rename from testdata/inline-tool-provider/kiox.yaml rename to testdata/inline-tool-provider/provider.yaml diff --git a/testdata/multi-tool-provider/kiox.yaml b/testdata/multi-tool-provider/provider.yaml similarity index 100% rename from testdata/multi-tool-provider/kiox.yaml rename to testdata/multi-tool-provider/provider.yaml diff --git a/testdata/setup-kubectl/kiox.yaml b/testdata/setup-kubectl/provider.yaml similarity index 100% rename from testdata/setup-kubectl/kiox.yaml rename to testdata/setup-kubectl/provider.yaml diff --git a/website/docs/examples/run-kubectl.md b/website/docs/examples/run-kubectl.md index 5e0849b..0ae223c 100644 --- a/website/docs/examples/run-kubectl.md +++ b/website/docs/examples/run-kubectl.md @@ -16,7 +16,7 @@ Run these commands from the repository root: ```bash ./bin/kiox release \ - --manifest testdata/setup-kubectl/kiox.yaml \ + --manifest testdata/setup-kubectl/provider.yaml \ --dist testdata/setup-kubectl/dist \ --output testdata/setup-kubectl/oci ``` diff --git a/website/docs/getting-started/quick-start.md b/website/docs/getting-started/quick-start.md index 5b15555..f39f351 100644 --- a/website/docs/getting-started/quick-start.md +++ b/website/docs/getting-started/quick-start.md @@ -14,7 +14,7 @@ make build ```bash ./bin/kiox release \ - --manifest testdata/multi-tool-provider/kiox.yaml \ + --manifest testdata/multi-tool-provider/provider.yaml \ --dist testdata/multi-tool-provider/dist \ --output testdata/multi-tool-provider/oci ``` diff --git a/website/docs/providers/provider-examples.md b/website/docs/providers/provider-examples.md index 039c8e9..ad8d7bb 100644 --- a/website/docs/providers/provider-examples.md +++ b/website/docs/providers/provider-examples.md @@ -15,7 +15,7 @@ Manual commands for all fixtures live in `TEST_PROVIDERS.md`. ## Legacy compatibility fixture -`testdata/echo-provider/kiox.yaml` keeps the old single-tool authoring model available: +`testdata/echo-provider/provider.yaml` keeps the old single-tool authoring model available under the preferred provider filename: ```yaml apiVersion: kiox.io/v1 @@ -46,7 +46,7 @@ Use it when you want the shortest possible provider manifest or need to validate ## Multi-document normalized fixture -`testdata/multi-tool-provider/kiox.yaml` shows the current package model split across several YAML documents: +`testdata/multi-tool-provider/provider.yaml` shows the current package model split across several YAML documents: - `setup-echo` is an `oci` tool backed by bundle layers - `echo-tool` is a `script` tool that depends on `setup-echo` @@ -55,7 +55,7 @@ Use it when you want the shortest possible provider manifest or need to validate ## Inline normalized fixture -`testdata/inline-tool-provider/kiox.yaml` keeps everything in one `Provider` document: +`testdata/inline-tool-provider/provider.yaml` keeps everything in one `Provider` document: - inline `tools`, `bundles`, `assets`, and `environments` - synthesized `spec.contents` @@ -64,7 +64,7 @@ Use it when you want the shortest possible provider manifest or need to validate ## Managed-install fixture -`testdata/setup-kubectl/kiox.yaml` demonstrates the new setup-provider flow: +`testdata/setup-kubectl/provider.yaml` demonstrates the new setup-provider flow: - `setup-kubectl` is a bundle-backed installer tool - `kubectl` is a `local` tool with `install.tool` and `install.path`