version: "1" name: orca-ci description: Orca — offline/CLI-first orchestration engine. Full release flow via CoreCI. # CoreCI configuration for orca. # # Each pipeline runs in an isolated container with the golang:1.25 toolchain. # All four pipelines (validate, build, test, release) must pass before a tag # can be published. The release pipeline is gated on the existence of a # semver tag (vX.Y.Z) and is the only pipeline that touches the Gitea API. pipelines: validate: description: Validate Go toolchain and code formatting steps: - name: go-version image: golang:1.25 commands: - go version - gofmt -l . - go vet ./... build: description: Build the orca binary with version injection steps: - name: build image: golang:1.25 env: VERSION: ${CI_COMMIT_TAG:-dev} GIT_COMMIT: ${CI_COMMIT_SHA} BUILD_TIME: ${CI_BUILD_TIME} commands: - | LDFLAGS="-s -w \ -X git.cloudinit.dev/coreci/orca/internal/cli.version=${VERSION} \ -X git.cloudinit.dev/coreci/orca/internal/cli.gitCommit=${GIT_COMMIT} \ -X git.cloudinit.dev/coreci/orca/internal/cli.buildTime=${BUILD_TIME}" go build -trimpath -ldflags="${LDFLAGS}" -o bin/orca ./cmd/orca - file bin/orca - ./bin/orca version test: description: Run all tests with race detection and coverage steps: - name: test image: golang:1.25 commands: - go test -race -coverprofile=coverage.out ./... - go tool cover -func=coverage.out | tail -1 release: description: Full release flow — versioned build, tarball, changelog, Gitea release when: ref: "refs/tags/v*" steps: - name: build-artifact image: golang:1.25 env: VERSION: ${CI_COMMIT_TAG} GIT_COMMIT: ${CI_COMMIT_SHA} BUILD_TIME: ${CI_BUILD_TIME} commands: - | LDFLAGS="-s -w \ -X git.cloudinit.dev/coreci/orca/internal/cli.version=${VERSION} \ -X git.cloudinit.dev/coreci/orca/internal/cli.gitCommit=${GIT_COMMIT} \ -X git.cloudinit.dev/coreci/orca/internal/cli.buildTime=${BUILD_TIME}" go build -trimpath -ldflags="${LDFLAGS}" -o bin/orca ./cmd/orca - make changelog - tar -czf orca-${VERSION}-linux-amd64.tar.gz -C bin orca - ls -lh orca-${VERSION}-linux-amd64.tar.gz - name: gitea-release image: golang:1.25 env: GITEA_TOKEN: ${GITEA_TOKEN} VERSION: ${CI_COMMIT_TAG} commands: - apk add --no-cache curl tar - sh -c "$(curl -fsSL https://gitea.com/gitea/tea/releases/latest/download/install.sh)" - tea releases create ${VERSION} --title "Orca ${VERSION}" --note-file CHANGELOG.md --asset orca-${VERSION}-linux-amd64.tar.gz