Skip to content

Commit 558d917

Browse files
feat: add Docker image, tests, docs and CLI snapshot (#1)
1 parent 37bb731 commit 558d917

28 files changed

Lines changed: 2756 additions & 1 deletion

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.git
2+
.github
3+
*.md
4+
LICENSE

.github/copilot-instructions.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copilot Instructions — devops-ia/powerpipe
2+
3+
## Project Overview
4+
5+
This repo maintains a community Docker image for [Powerpipe](https://powerpipe.io). Turbot stopped publishing official Docker images, so we build from their pre-compiled binaries.
6+
7+
The image is a thin wrapper: it downloads the Powerpipe binary, sets up the runtime environment (UID 9193, dirs, env vars), and provides a default CMD.
8+
9+
## Architecture
10+
11+
```
12+
Dockerfile → builds the image (ARG POWERPIPE_VERSION controls version)
13+
README.md → documents flags, env vars, quickstart, Kubernetes notes
14+
cli-snapshot.json → machine-readable snapshot of CLI behavior (auto-generated)
15+
scripts/ → extraction and comparison tools (do not modify)
16+
package.json → semantic-release config (do not modify)
17+
```
18+
19+
## When Upstream Releases a New Version
20+
21+
1. Review the behavioral diff in the PR comment
22+
2. Update `README.md`:
23+
- Add new CLI flags to the flag tables
24+
- Remove deprecated/removed flags
25+
- Add new environment variables to the env var table
26+
- Remove dropped environment variables
27+
- Update the version in example commands if relevant
28+
3. Update `Dockerfile`:
29+
- Add/remove ENV vars if defaults changed
30+
- Update HEALTHCHECK if the service behavior changed
31+
4. Do NOT update `ARG POWERPIPE_VERSION` (updatecli handles this)
32+
5. Do NOT modify `cli-snapshot.json` (CI regenerates it)
33+
34+
## Files You SHOULD Modify
35+
36+
- `README.md` — flag tables, env var tables, examples
37+
- `Dockerfile` — ENV defaults, HEALTHCHECK, EXPOSE
38+
39+
## Files You MUST NOT Modify
40+
41+
- `.github/workflows/` — CI/CD pipelines
42+
- `package.json` — semantic-release config
43+
- `cli-snapshot.json` — auto-generated by CI
44+
- `scripts/` — extraction tools
45+
- `LICENSE`
46+
47+
## How to Build and Test
48+
49+
```bash
50+
# Build
51+
docker build -t powerpipe:test .
52+
53+
# Smoke test
54+
docker run --rm powerpipe:test powerpipe --version
55+
56+
# Server test
57+
docker run --rm -d --name pp-test -p 9033:9033 powerpipe:test powerpipe server
58+
sleep 5
59+
curl -sf http://localhost:9033/ && echo "OK"
60+
docker stop pp-test
61+
```
62+
63+
## Documentation Format
64+
65+
Flag tables use this format:
66+
```markdown
67+
| Flag | Description | Default |
68+
|------|-------------|---------|
69+
| `--listen` | Listen address (local/network) | `network` |
70+
```
71+
72+
Env var tables use this format:
73+
```markdown
74+
| Variable | Image default | Description |
75+
|----------|--------------|-------------|
76+
| `POWERPIPE_LISTEN` | `network` | Interface to listen on |
77+
```

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
actions:
9+
patterns:
10+
- "*"
11+
12+
- package-ecosystem: pip
13+
directory: /tests
14+
schedule:
15+
interval: weekly

.github/updatecli/powerpipe.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Bump Powerpipe version
3+
4+
scms:
5+
github:
6+
kind: github
7+
spec:
8+
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
9+
email: '{{ requiredEnv "GITHUB_ACTOR" }}@users.noreply.github.com'
10+
owner: devops-ia
11+
repository: powerpipe
12+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
13+
branch: main
14+
commitmessage:
15+
title: 'chore: bump powerpipe to {{ source "powerpipe" }}'
16+
17+
sources:
18+
powerpipe:
19+
kind: githubRelease
20+
spec:
21+
owner: turbot
22+
repository: powerpipe
23+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
24+
versionFilter:
25+
kind: semver
26+
pattern: ">=1.0.0"
27+
28+
targets:
29+
dockerfile:
30+
name: "Update Powerpipe version in Dockerfile"
31+
kind: file
32+
scmid: github
33+
sourceid: powerpipe
34+
spec:
35+
file: Dockerfile
36+
matchpattern: 'ARG POWERPIPE_VERSION=.*'
37+
replacepattern: 'ARG POWERPIPE_VERSION={{ source "powerpipe" }}'
38+
39+
actions:
40+
pr:
41+
kind: github/pullrequest
42+
scmid: github
43+
title: 'chore: bump powerpipe to {{ source "powerpipe" }}'
44+
spec:
45+
labels:
46+
- dependencies
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Copilot Setup Steps
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
paths:
8+
- .github/workflows/copilot-setup-steps.yml
9+
pull_request:
10+
paths:
11+
- .github/workflows/copilot-setup-steps.yml
12+
13+
jobs:
14+
copilot-setup-steps:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
steps:
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
21+
- name: Install tools
22+
run: |
23+
sudo apt-get update -qq && sudo apt-get install -y -qq jq > /dev/null
24+
echo "jq $(jq --version), docker $(docker --version)"
25+
26+
- name: Build Docker image
27+
run: docker build -t powerpipe:local .
28+
29+
- name: Validate
30+
run: docker run --rm powerpipe:local powerpipe --version

0 commit comments

Comments
 (0)