Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2bcc3f7
chore: add MIT license
josh-tracey Jul 8, 2026
61eaa8b
feat(workflow): add image artifact report model
josh-tracey Jul 9, 2026
8123cda
feat(workflow): implement ci-build-push-plan workflow
josh-tracey Jul 9, 2026
f4f5078
feat(workflow): add ImagePushPlanReport and plumb push-plan into reports
josh-tracey Jul 9, 2026
9a6e0af
chore: cleanup
josh-tracey Jul 9, 2026
5388988
chore: add staging config
josh-tracey Jul 9, 2026
63d2f5b
chore: add staging config
josh-tracey Jul 9, 2026
d2c13cd
chore: fmt
josh-tracey Jul 9, 2026
079fd59
chore: cleanup
josh-tracey Jul 9, 2026
b7e0bf0
feat(workflow): implement ci-build-push execution and report accumula…
josh-tracey Jul 9, 2026
cba54e8
chore: cleanup and ci fixes
josh-tracey Jul 9, 2026
6ef1834
chore: update ci
josh-tracey Jul 9, 2026
45873e6
fix: failing tests
josh-tracey Jul 9, 2026
5254093
ci: cleanup
josh-tracey Jul 9, 2026
d50aeeb
fix(ci): restore green Rust CI
josh-tracey Jul 9, 2026
6672df8
test(workflow): verify ci-build-push plan and task names
josh-tracey Jul 9, 2026
ff7dbc1
test(workflow): verify digest-bearing image push reports
josh-tracey Jul 9, 2026
f1ea667
docs: mark stage 3 readiness status
josh-tracey Jul 9, 2026
5d8ee46
fix(registry): apply registry namespace correctly to image references…
josh-tracey Jul 9, 2026
63f937a
feat(ci): add provider-specific guidance to CI safety validation errors
josh-tracey Jul 9, 2026
19f9bf9
docs: finalize CircleCI external repo pilot findings
josh-tracey Jul 9, 2026
868a7f6
fix(workflow): do not overwrite explicitly configured approval mode w…
josh-tracey Jul 9, 2026
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
44 changes: 44 additions & 0 deletions .github/workflows/image-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Image Build and Push

on:
workflow_dispatch:
inputs:
run_ci_build_push:
description: 'Check to enable mutating registry push'
required: true
type: boolean

jobs:
build_and_push:
if: ${{ github.event.inputs.run_ci_build_push == 'true' }}
name: Build and Push Images
runs-on: ubuntu-latest
environment: image-push
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build Sailr
run: cargo build --release

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run CI Build and Push Workflow
run: target/release/sailr workflow run ci-build-push --non-interactive --apply

- name: Upload Image Report
uses: actions/upload-artifact@v4
with:
name: image-report
path: .sailr/reports/ci-build-push/latest.json
36 changes: 24 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-targets -- -D warnings

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Run Check Formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy -- -D warnings
- name: Run Tests
run: cargo test --verbose
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
1 change: 1 addition & 0 deletions .github/workflows/sailr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
profile:
- ci
- ci-build-plan
- ci-build-push-plan
- ci-generate
- ci-deploy-plan

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Sailr Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 14 additions & 0 deletions docs/PR-17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Stage 3: `ci-build-push`
Status: complete

Includes:
- `ci-build-push` profile.
- Manual protected image push workflow.
- GHCR login.
- Runtime image report accumulator.
- Mandatory digest capture.
- Digest-bearing `ImageArtifact` reports.
- `push=run` plan/graph/explain support.

### Stage 4: promotion plan
Status: next
36 changes: 36 additions & 0 deletions docs/pilots/circleci-external-repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CircleCI External Repo Pilot

## External repo
https://github.com/josh-tracey/sailr-travis-pilot

## Sailr revision
`experiment/runkernel`

## CI provider
CircleCI

## Registry
`europe-west2-docker.pkg.dev` (GCP Artifact Registry)

## Service
`skyfleet`

## Profiles tested
- `ci-build-push-plan`
- `ci-build-push`

## What passed
- Sailr installed from Git revision.
- Push plan ran in CircleCI.
- CircleCI approval gate configured and worked.
- Sailr accepted `approval = external`.
- Image pushed to registry (GCP).
- Digest captured.
- Report validated with jq.

## Issues found
- Initial failure: `CI push requires approval=external`.
- Resolution: Kept `approval = external` in `sailr.workflow.toml` and added `approve_image_push` job of `type: approval` to CircleCI configuration to align manual approval gates with Sailr's CI safety constraints.

## Follow-up work
- Provider-specific error messages implemented in Sailr (`src/workflow/runner.rs`) to guide developers towards correct CI setups for CircleCI, GitHub Actions, and Travis.
6 changes: 5 additions & 1 deletion k8s/environments/staging/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "staging"
log_level = "INFO"
domain = "staging.example.local"
default_replicas = 1
registry = "docker.io"
registry = "ttl.sh"

[[service]]
name = "hello-sailr"
Expand All @@ -14,3 +14,7 @@ path = "hello-sailr"
name = "ci-build-hello"
version = "ci"
path = "examples/ci-build/hello"

[service.build]
path = "examples/ci-build/hello"
include = ["Dockerfile", "index.html"]
Empty file.
Empty file.
11 changes: 0 additions & 11 deletions k8s/generated/local/hello-sailr/0_configmap.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions k8s/generated/local/hello-sailr/deployment.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions k8s/generated/local/hello-sailr/ingress.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions k8s/generated/local/hello-sailr/service.yaml

This file was deleted.

24 changes: 24 additions & 0 deletions sailr.workflow.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,27 @@ namespace = "default"
approval = "external"
apply = true
report = "both"

[workflow.ci-build-push-plan]
environment = "staging"
mode = "build"
interactive = false
build = "plan"
push = "plan"
generate = "disabled"
deploy = "disabled"
approval = "none"
apply = false
report = "both"

[workflow.ci-build-push]
environment = "staging"
mode = "build"
interactive = false
build = "run"
push = "run"
generate = "disabled"
deploy = "disabled"
approval = "external"
apply = true
report = "both"
Loading
Loading