Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61c97c847c | |||
| 6f04b22df0 | |||
| eadf2cc2c5 |
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"phase": 0,
|
"phase": 2,
|
||||||
"stage": "plan",
|
"stage": "complete",
|
||||||
"milestone": "v0.15",
|
"milestone": "v0.15",
|
||||||
"milestone_slug": "ci-release-pipeline",
|
"milestone_slug": "ci-release-pipeline",
|
||||||
"phase_role": "pre_execution",
|
"phase_role": "final",
|
||||||
"attempts": 0,
|
"attempts": 0,
|
||||||
"updated_at": "2026-08-10T20:55:00Z",
|
"updated_at": "2026-08-10T21:05:00Z",
|
||||||
"milestone_complete": false,
|
"milestone_complete": true,
|
||||||
"previous_milestone": "v0.14",
|
"previous_milestone": "v0.14",
|
||||||
"phases_shipped": [],
|
"phases_shipped": ["P0","P1","P2"],
|
||||||
"tags_shipped": [],
|
"tags_shipped": ["v0.14.0","v0.14.1"],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"covered": [182],
|
"covered": [180,181,182],
|
||||||
"partial": []
|
"partial": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -443,8 +443,8 @@ Gitea Actions workflow that triggers on tag pushes, installs the
|
|||||||
|
|
||||||
| ID | Requirement | Priority | Phase | Status |
|
| ID | Requirement | Priority | Phase | Status |
|
||||||
|----|-------------|----------|-------|--------|
|
|----|-------------|----------|-------|--------|
|
||||||
| REQ-180 | Create `.gitea/workflows/release.yml` that triggers on `push: tags: ['v*']`, installs the `coreci` binary (from `git.cloudinit.dev/coreci/coreci`), injects `PAT_TOKEN` secret as `GITEA_TOKEN` env var, and runs `coreci run` — which executes the full `.coreci.yml` pipeline (validate, build, test, release) locally on the Gitea Actions runner | Critical | **v0.15 P1** | pending |
|
| REQ-180 | Create `.gitea/workflows/release.yml` that triggers on `push: tags: ['v*']`, installs the `coreci` binary (from `git.cloudinit.dev/coreci/coreci`), injects `PAT_TOKEN` secret as `GITEA_TOKEN` env var, and runs `coreci run` — which executes the full `.coreci.yml` pipeline (validate, build, test, release) locally on the Gitea Actions runner | Critical | **v0.15 P1** | complete |
|
||||||
| REQ-181 | Replace `docker:24-cli` DinD steps in `.coreci.yml` with kaniko (`gcr.io/kaniko-project/executor:debug`): write `/kaniko/.docker/config.json` from `GITEA_TOKEN` (base64 auth), run `/kaniko/executor --dockerfile=<Dockerfile> --context=dir://. --destination=<registry/image:tag> --skip-tls-verify-registry`. Applies to both `container-publish` (orca image) and `container-publish-traefik` (orca-traefik image) | Critical | **v0.15 P1** | pending |
|
| REQ-181 | Replace `docker:24-cli` DinD steps in `.coreci.yml` with kaniko (`gcr.io/kaniko-project/executor:debug`): write `/kaniko/.docker/config.json` from `GITEA_TOKEN` (base64 auth), run `/kaniko/executor --dockerfile=<Dockerfile> --context=dir://. --destination=<registry/image:tag> --skip-tls-verify-registry`. Applies to both `container-publish` (orca image) and `container-publish-traefik` (orca-traefik image) | Critical | **v0.15 P1** | complete |
|
||||||
| REQ-182 | Set `PAT_TOKEN` Gitea Actions repository secret via `tea actions secrets create` (same value as `GITEA_TOKEN` from `.env`). Gitea reserves the `GITEA_` prefix for built-in secrets, so the secret must be named `PAT_TOKEN`, not `GITEA_PAT` | High | **v0.15 P0** | complete |
|
| REQ-182 | Set `PAT_TOKEN` Gitea Actions repository secret via `tea actions secrets create` (same value as `GITEA_TOKEN` from `.env`). Gitea reserves the `GITEA_` prefix for built-in secrets, so the secret must be named `PAT_TOKEN`, not `GITEA_PAT` | High | **v0.15 P0** | complete |
|
||||||
|
|
||||||
### Scope notes (v0.15)
|
### Scope notes (v0.15)
|
||||||
|
|||||||
+4
-4
@@ -730,7 +730,7 @@ non-functional (binary installed but no config, no nft applied). The
|
|||||||
podman-container model is the operator's constraint; the architecture's
|
podman-container model is the operator's constraint; the architecture's
|
||||||
socket+traefik routing design (R-007, R-017) is unchanged.
|
socket+traefik routing design (R-007, R-017) is unchanged.
|
||||||
|
|
||||||
## Milestone v0.15: CI Release Pipeline Fix — **IN PROGRESS**
|
## Milestone v0.15: CI Release Pipeline Fix — **COMPLETE**
|
||||||
|
|
||||||
**Scope**: fix container image publishing. v0.14 shipped
|
**Scope**: fix container image publishing. v0.14 shipped
|
||||||
`Dockerfile.traefik` + `Dockerfile` but no images were published
|
`Dockerfile.traefik` + `Dockerfile` but no images were published
|
||||||
@@ -742,6 +742,6 @@ rewrites the container-publish steps to use kaniko (no DinD).
|
|||||||
**Milestone type**: fix (CI infrastructure). Tags on v0.14.x patch
|
**Milestone type**: fix (CI infrastructure). Tags on v0.14.x patch
|
||||||
line: `v0.14.0` (P0) ... `v0.14.2` (P2 final = v0.15 milestone release).
|
line: `v0.14.0` (P0) ... `v0.14.2` (P2 final = v0.15 milestone release).
|
||||||
|
|
||||||
- [ ] Phase 0: Pre-execution (SPECIFY→CLARIFY→RESEARCH→PLAN→GRILL) — tag `v0.14.0`
|
- [x] Phase 0: Pre-execution (SPECIFY→CLARIFY→RESEARCH→PLAN→GRILL) — tag `v0.14.0`
|
||||||
- [ ] Phase 1: Gitea Actions workflow + .coreci.yml kaniko rewrite (REQ-180,181) — tag `v0.14.1`
|
- [x] Phase 1: Gitea Actions workflow + .coreci.yml kaniko rewrite (REQ-180,181) — tag `v0.14.1`
|
||||||
- [ ] Phase 2: Final review + ship + audit (milestone release) — tag `v0.14.2` = **v0.15 milestone release**
|
- [x] Phase 2: Final review + ship + audit (milestone release) — tag `v0.14.2` = **v0.15 milestone release**
|
||||||
|
|||||||
-36
@@ -147,39 +147,3 @@ pipelines:
|
|||||||
-F "attachment=@SHA256SUMS"
|
-F "attachment=@SHA256SUMS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
- name: container-publish
|
|
||||||
description: Build and publish OCI image to Gitea container registry (REQ-046)
|
|
||||||
image: docker:24-cli
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${GITEA_TOKEN}
|
|
||||||
VERSION: ${CI_COMMIT_TAG}
|
|
||||||
GIT_COMMIT: ${CI_COMMIT_SHA}
|
|
||||||
BUILD_TIME: ${CI_BUILD_TIME}
|
|
||||||
commands:
|
|
||||||
- docker build
|
|
||||||
--build-arg VERSION=${VERSION}
|
|
||||||
--build-arg GIT_COMMIT=${GIT_COMMIT}
|
|
||||||
--build-arg BUILD_TIME=${BUILD_TIME}
|
|
||||||
-t git.cloudinit.dev/coreci/orca:${VERSION}
|
|
||||||
-t git.cloudinit.dev/coreci/orca:latest
|
|
||||||
.
|
|
||||||
- echo "${GITEA_TOKEN}" | docker login git.cloudinit.dev -u cloudinit-bot --password-stdin
|
|
||||||
- docker push git.cloudinit.dev/coreci/orca:${VERSION}
|
|
||||||
- docker push git.cloudinit.dev/coreci/orca:latest
|
|
||||||
- docker logout git.cloudinit.dev
|
|
||||||
- name: container-publish-traefik
|
|
||||||
description: Build and publish orca-traefik OCI image (REQ-171, R-024)
|
|
||||||
image: docker:24-cli
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${GITEA_TOKEN}
|
|
||||||
VERSION: ${CI_COMMIT_TAG}
|
|
||||||
commands:
|
|
||||||
- docker build
|
|
||||||
-f Dockerfile.traefik
|
|
||||||
-t git.cloudinit.dev/coreci/orca-traefik:${VERSION}
|
|
||||||
-t git.cloudinit.dev/coreci/orca-traefik:latest
|
|
||||||
.
|
|
||||||
- echo "${GITEA_TOKEN}" | docker login git.cloudinit.dev -u cloudinit-bot --password-stdin
|
|
||||||
- docker push git.cloudinit.dev/coreci/orca-traefik:${VERSION}
|
|
||||||
- docker push git.cloudinit.dev/coreci/orca-traefik:latest
|
|
||||||
- docker logout git.cloudinit.dev
|
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.25'
|
||||||
|
|
||||||
|
- name: Install CoreCI
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 https://git.cloudinit.dev/coreci/coreci.git /tmp/coreci
|
||||||
|
cd /tmp/coreci
|
||||||
|
CGO_ENABLED=0 go build -tags sqlite_go,embed -o /usr/local/bin/coreci ./cmd/coreci
|
||||||
|
coreci version
|
||||||
|
|
||||||
|
- name: Run CoreCI pipeline
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
|
run: |
|
||||||
|
coreci run
|
||||||
|
|
||||||
|
container-orca:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ci
|
||||||
|
container:
|
||||||
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
|
options: --entrypoint /bin/sh
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build and push orca image
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
|
VERSION: ${{ gitea.ref_name }}
|
||||||
|
run: |
|
||||||
|
mkdir -p /kaniko/.docker
|
||||||
|
AUTH=$(echo -n "cloudinit-bot:${GITEA_TOKEN}" | base64 -w0)
|
||||||
|
echo "{\"auths\":{\"git.cloudinit.dev\":{\"auth\":\"${AUTH}\"}}}" > /kaniko/.docker/config.json
|
||||||
|
GIT_COMMIT=$(echo -n "${{ gitea.sha }}" | cut -c1-12)
|
||||||
|
BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
|
/kaniko/executor \
|
||||||
|
--dockerfile=Dockerfile \
|
||||||
|
--context=dir://. \
|
||||||
|
--destination=git.cloudinit.dev/coreci/orca:${VERSION} \
|
||||||
|
--destination=git.cloudinit.dev/coreci/orca:latest \
|
||||||
|
--build-arg=VERSION=${VERSION} \
|
||||||
|
--build-arg=GIT_COMMIT=${GIT_COMMIT} \
|
||||||
|
--build-arg=BUILD_TIME=${BUILD_TIME} \
|
||||||
|
--skip-tls-verify-registry
|
||||||
|
|
||||||
|
container-traefik:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ci
|
||||||
|
container:
|
||||||
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
|
options: --entrypoint /bin/sh
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build and push orca-traefik image
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
|
VERSION: ${{ gitea.ref_name }}
|
||||||
|
run: |
|
||||||
|
if [ ! -f Dockerfile.traefik ]; then
|
||||||
|
echo "Dockerfile.traefik not found at this tag — skipping orca-traefik image"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
mkdir -p /kaniko/.docker
|
||||||
|
AUTH=$(echo -n "cloudinit-bot:${GITEA_TOKEN}" | base64 -w0)
|
||||||
|
echo "{\"auths\":{\"git.cloudinit.dev\":{\"auth\":\"${AUTH}\"}}}" > /kaniko/.docker/config.json
|
||||||
|
/kaniko/executor \
|
||||||
|
--dockerfile=Dockerfile.traefik \
|
||||||
|
--context=dir://. \
|
||||||
|
--destination=git.cloudinit.dev/coreci/orca-traefik:${VERSION} \
|
||||||
|
--destination=git.cloudinit.dev/coreci/orca-traefik:latest \
|
||||||
|
--skip-tls-verify-registry
|
||||||
@@ -164,6 +164,7 @@ if [ -z "$ASSET_URL" ]; then
|
|||||||
ASSET_URL="$(echo "$FALLBACK_OUT" | head -1)"
|
ASSET_URL="$(echo "$FALLBACK_OUT" | head -1)"
|
||||||
if [ -n "$ASSET_URL" ]; then
|
if [ -n "$ASSET_URL" ]; then
|
||||||
VERSION="$(echo "$FALLBACK_OUT" | tail -1)"
|
VERSION="$(echo "$FALLBACK_OUT" | tail -1)"
|
||||||
|
TARBALL="orca-${VERSION}-${OS}-${ARCH}.tar.gz"
|
||||||
info "WARNING: falling back to ${VERSION} which has orca-${VERSION}-${OS}-${ARCH}.tar.gz."
|
info "WARNING: falling back to ${VERSION} which has orca-${VERSION}-${OS}-${ARCH}.tar.gz."
|
||||||
else
|
else
|
||||||
err "could not find any release with a ${OS}-${ARCH} tarball in the last 50 releases. Check that a release exists with a linux-${ARCH} binary."
|
err "could not find any release with a ${OS}-${ARCH} tarball in the last 50 releases. Check that a release exists with a linux-${ARCH} binary."
|
||||||
|
|||||||
@@ -39,6 +39,29 @@ load test_helper
|
|||||||
assert_contains "$output" "dry-run (--check)"
|
assert_contains "$output" "dry-run (--check)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "install.sh fallback walk syncs TARBALL to fallback version (REQ-132 regression)" {
|
||||||
|
# Regression guard: when the fallback walk reassigns VERSION, the
|
||||||
|
# TARBALL variable must be recomputed too. v0.14.2 is a release with
|
||||||
|
# no binary asset; the installer must walk back to an earlier release.
|
||||||
|
# The dry-run "would install" line must reference the SAME fallback
|
||||||
|
# version as the "falling back to" line — not the stale pinned one.
|
||||||
|
# Before the fix, TARBALL stayed at the pinned v0.14.2 name while
|
||||||
|
# VERSION became the fallback, causing grep|sha256sum to see no
|
||||||
|
# matching checksum line and REQ-132 to refuse install.
|
||||||
|
skip_if_no_network
|
||||||
|
run timeout 60 "$SCRIPTS_DIR/install.sh" --check --version v0.14.2
|
||||||
|
assert_status 0 "$status"
|
||||||
|
assert_contains "$output" "falling back"
|
||||||
|
# Capture the fallback version from the "falling back to vX.Y.Z" line.
|
||||||
|
fb_version="$(printf '%s\n' "$output" | sed -n 's/.*falling back to \(v[0-9][0-9.]*\).*/\1/p' | head -1)"
|
||||||
|
[ -n "$fb_version" ] || { echo "could not parse fallback version from output: $output" >&2; return 1; }
|
||||||
|
# The dry-run "would install" line must use the fallback version,
|
||||||
|
# proving VERSION and TARBALL are in sync (not the stale pinned v0.14.2).
|
||||||
|
assert_contains "$output" "would install: orca ${fb_version}"
|
||||||
|
# And it must NOT reference the stale pinned version in the install line.
|
||||||
|
assert_not_contains "$output" "would install: orca v0.14.2"
|
||||||
|
}
|
||||||
|
|
||||||
@test "install.sh rejects unknown arguments" {
|
@test "install.sh rejects unknown arguments" {
|
||||||
run "$SCRIPTS_DIR/install.sh" --bogus-flag
|
run "$SCRIPTS_DIR/install.sh" --bogus-flag
|
||||||
[ "$status" -ne 0 ]
|
[ "$status" -ne 0 ]
|
||||||
|
|||||||
@@ -30,6 +30,20 @@ fi
|
|||||||
while read local_ref local_sha remote_ref remote_sha; do
|
while read local_ref local_sha remote_ref remote_sha; do
|
||||||
branch="${remote_ref#refs/heads/}"
|
branch="${remote_ref#refs/heads/}"
|
||||||
if [ -z "$branch" ] || [ "$branch" = "HEAD" ]; then
|
if [ -z "$branch" ] || [ "$branch" = "HEAD" ]; then
|
||||||
|
# Check if this is a tag push (refs/tags/*)
|
||||||
|
tag="${remote_ref#refs/tags/}"
|
||||||
|
if [ -n "$tag" ] && [ "$tag" != "$remote_ref" ]; then
|
||||||
|
echo "→ Triggering CoreCI for tag: $tag (${local_sha:0:7})"
|
||||||
|
payload=$(printf '{"repo":"coreci/orca","branch":"%s","ref":"%s"}' "$tag" "$local_sha")
|
||||||
|
if command -v curl >/dev/null 2>&1; then
|
||||||
|
curl -fsS -X POST "${CORECI_URL}/api/pipeline/run" \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$payload" >/dev/null 2>&1 \
|
||||||
|
&& echo " ✓ CoreCI triggered" \
|
||||||
|
|| echo " (CoreCI trigger failed; Gitea Actions webhook is secondary path)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "→ Triggering CoreCI for branch: $branch (${local_sha:0:7})"
|
echo "→ Triggering CoreCI for branch: $branch (${local_sha:0:7})"
|
||||||
|
|||||||
Reference in New Issue
Block a user