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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25'

- name: Unit tests
run: go test ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
go-version: "1.25"

- name: Build pipekit
run: make build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25'
cache: true

- name: Run tests
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img src="docs/assets/pipekit-wordmark.png" alt="Pipekit — CI/CD pipeline toolkit" width="520">
<p>
<img src="https://img.shields.io/badge/Go-1.24%2B-00ADD8?style=flat-square&logo=go" alt="Go Version">
<img src="https://img.shields.io/badge/Go-1.25%2B-00ADD8?style=flat-square&logo=go" alt="Go Version">
<img src="https://img.shields.io/badge/OS-Linux%20%7C%20macOS%20%7C%20Windows-darkblue?style=flat-square&logo=windows" alt="OS Support">
<img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License">
</p>
Expand Down Expand Up @@ -52,6 +52,12 @@ pipekit wait url http://localhost:8080/healthz --timeout 150s
pipekit wait grpc localhost:50051 --service my.package.Worker --timeout 60s
pipekit wait ws ws://localhost:8080/events --timeout 60s

# Request an API and extract JSON without curl+jq
pipekit http get https://api.example.com/release --expect-status 200 --jq .tag --raw

# Pack cross-platform release archives
pipekit archive pack dist/app.tar.zst ./bin/app README.md

# Retry a flaky command with exponential backoff
pipekit retry run --attempts 5 --delay 5s --backoff -- helm upgrade --install myapp ./chart

Expand Down Expand Up @@ -81,6 +87,7 @@ More end-to-end recipes → **[docs/EXAMPLES.md](docs/EXAMPLES.md)**
| `cache-key` | Deterministic SHA256 cache keys from files / globs / composite parts | [↗](docs/COMMANDS.md#cache-key) |
| `checksum` | Generate / verify release checksums for artifact files | [↗](docs/COMMANDS.md#checksum) |
| `artifact` | Assert artifacts exist and generate size/SHA256 manifests | [↗](docs/COMMANDS.md#artifact) |
| `archive` | Pack, list, and unpack zip/tar/tar.gz/tar.xz/tar.zst archives | [↗](docs/COMMANDS.md#archive) |
| `git` | CI-friendly git metadata: ref, SHA, tags, dirty state | [↗](docs/COMMANDS.md#git) |
| `changelog` | Generate release notes from git commit ranges | [↗](docs/COMMANDS.md#changelog) |
| `config` | Resolve env-specific config maps; map branches to environments | [↗](docs/COMMANDS.md#config) |
Expand All @@ -89,6 +96,7 @@ More end-to-end recipes → **[docs/EXAMPLES.md](docs/EXAMPLES.md)**
| `json` / `yaml` | Get / set / del / deep-merge / convert / pretty / table on JSON, YAML, TOML, CSV | [↗](docs/COMMANDS.md#json) |
| `render` | Render Go templates with a sprig-like FuncMap and stacked `--values` files | [↗](docs/COMMANDS.md#render) |
| `exec` | Unified retry + mask + tee + timeout command runner | [↗](docs/COMMANDS.md#exec) |
| `http` | Curl-like HTTP requests, JSON extraction, uploads, and chained flows | [↗](docs/COMMANDS.md#http) |
| `url parse` | Split a URL into `SCHEME / HOST / PORT / USER / PASSWORD / PATH / QUERY` env vars | [↗](docs/COMMANDS.md#url) |
| `image parse` | Split a container image ref into registry / repository / tag / digest | [↗](docs/COMMANDS.md#image) |
| `time` | RFC3339 / unix / tag / compact / iso timestamps; format conversion; arithmetic | [↗](docs/COMMANDS.md#time) |
Expand Down
92 changes: 92 additions & 0 deletions actions/archive.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
package actions

import (
"encoding/json"
"fmt"
"strings"

"github.com/AxeForging/pipekit/services"

"github.com/urfave/cli"
)

// ArchiveCommand returns archive pack/list/unpack helpers.
func ArchiveCommand() cli.Command {
return cli.Command{
Name: "archive",
Usage: "pack, list, and unpack tar/zip archives",
Subcommands: []cli.Command{
{
Name: "pack",
Usage: "create an archive from files or directories",
ArgsUsage: "OUTPUT INPUT...",
Flags: []cli.Flag{
cli.StringFlag{Name: "format, f", Usage: "zip, tar, tar.gz, tar.xz, or tar.zst (default: detect from output)"},
},
Action: func(c *cli.Context) error {
args := c.Args()
if len(args) < 2 {
return cli.NewExitError("usage: archive pack OUTPUT INPUT...", 1)
}
if err := services.PackArchive(args[0], args[1:], c.String("format")); err != nil {
return cli.NewExitError(err.Error(), 1)
}
return nil
},
},
{
Name: "unpack",
Usage: "extract an archive",
ArgsUsage: "ARCHIVE",
Flags: []cli.Flag{
cli.StringFlag{Name: "dest, C", Value: ".", Usage: "destination directory"},
cli.StringFlag{Name: "format, f", Usage: "zip, tar, tar.gz, tar.xz, or tar.zst (default: detect from input)"},
cli.IntFlag{Name: "strip-components", Usage: "strip leading path components while extracting"},
},
Action: func(c *cli.Context) error {
input, err := firstArgOrErr(c, "ARCHIVE")
if err != nil {
return err
}
if err := services.UnpackArchive(input, c.String("dest"), c.String("format"), c.Int("strip-components")); err != nil {
return cli.NewExitError(err.Error(), 1)
}
return nil
},
},
{
Name: "list",
Usage: "list archive entries",
ArgsUsage: "ARCHIVE",
Flags: []cli.Flag{
cli.StringFlag{Name: "format, f", Usage: "zip, tar, tar.gz, tar.xz, or tar.zst (default: detect from input)"},
cli.BoolFlag{Name: "json", Usage: "output entry metadata as JSON"},
},
Action: func(c *cli.Context) error {
input, err := firstArgOrErr(c, "ARCHIVE")
if err != nil {
return err
}
entries, err := services.ListArchive(input, c.String("format"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
}
if c.Bool("json") {
b, err := json.MarshalIndent(entries, "", " ")
if err != nil {
return err
}
fmt.Println(string(b))
return nil
}
names := make([]string, 0, len(entries))
for _, entry := range entries {
names = append(names, entry.Name)
}
fmt.Println(strings.Join(names, "\n"))
return nil
},
},
},
}
}
Loading
Loading