91 lines
4.5 KiB
YAML
91 lines
4.5 KiB
YAML
# Gitea integration for fetching commits and posting build statuses.
|
|
# This repository's CI home is the Gitea at git.javagil.de; github.com only mirrors it.
|
|
gitea:
|
|
baseUrl: https://git.javagil.de # base URL of the Gitea instance
|
|
owner: mi # repository owner (user or organisation) for Gitea API (e.g. status checks)
|
|
repo: werkator # repository name
|
|
statusContext: werkator # label shown on Gitea commit status checks (default: werkator)
|
|
|
|
# Build artifact retention.
|
|
artifacts:
|
|
# number of builds to keep per branch
|
|
retentionPerBranch: 5
|
|
# merged branches are deleted from origin, and their history entries go after this age
|
|
retentionMaxAge: 90d
|
|
|
|
# Controls the branch-polling loop.
|
|
watcher:
|
|
# max commit age for new origin branches to be pulled automatically
|
|
newBranchMaxAge: 5d
|
|
|
|
# Named build definitions. "default" is the base every other one inherits its
|
|
# settings from — never its trigger.
|
|
builds:
|
|
default:
|
|
# When this build runs and for which branches. The only part a build does
|
|
# NOT inherit from the default — everything below it does.
|
|
trigger:
|
|
onPush: true # build every new commit of the selected branches
|
|
# run before each build
|
|
cleanCommand: rm -rf build
|
|
# shell command for each build; runtimeBundleDir is what the deploy build below
|
|
# installs — only the sandbox has a JDK, the host has none, so the bundle has
|
|
# to be built here and is handed on through the worktree (RFC 0005). The
|
|
# directory, not the tarball: it is unpacked on the machine that built it, so
|
|
# packing it would be work for nobody. Only tools/remote, which transfers it to
|
|
# another host, builds the archive with runtimeBundle.
|
|
buildCommand: node --test src/test/js/*.test.cjs && ./gradlew --console=plain --no-daemon test runtimeBundleDir
|
|
# directories copied as build artifacts
|
|
artifactDirs:
|
|
- build/reports
|
|
# a normal build ends in minutes; the host allows more because of the
|
|
# mutation build below, and this keeps a hanging build from using it
|
|
timeout: 10m
|
|
stdoutLog: build.stdout.log # filename for captured stdout
|
|
stderrLog: build.stderr.log # filename for captured stderr
|
|
# Werkator's own Testcontainers smoke test skipped itself everywhere it
|
|
# mattered, because the build sandbox had no engine to talk to. It has one
|
|
# now: a werkdock API socket in this repository's build-environment home,
|
|
# which the werkdock runner binds into every sandbox as /root, so the build
|
|
# reaches it without an extra mount. Ryuk is off because it wants a socket
|
|
# inside a container of its own, which werkdock does not offer.
|
|
# Server side: the systemd user unit werkdock-api-werkator.service, and
|
|
# alpine:3 in the werkdock store.
|
|
werkdock:
|
|
env:
|
|
DOCKER_HOST: "unix:///root/werkdock.sock"
|
|
TESTCONTAINERS_RYUK_DISABLED: "true"
|
|
|
|
# What the deployment does; when, for which branches and outside the sandbox is
|
|
# the host's part, and it is pinned — a branch can neither add the trigger nor
|
|
# widen it, so no branch deploys itself (RFC 0005, docs/configuration.md).
|
|
# Without that host part this definition has no trigger and never runs.
|
|
deploy:
|
|
# keeps the bundle the test build just produced in this worktree; a clean
|
|
# would throw away exactly what is to be installed
|
|
cleanCommand: ""
|
|
buildCommand: tools/self-deploy
|
|
# the bundle is 91 MiB in the worktree and has no reader once it is installed
|
|
artifactDirs: []
|
|
|
|
# Mutation testing (PIT) with Mutation-CRAP per method (werkcrappit), nightly
|
|
# and only when main moved. Every spec but two (see build.gradle.kts) runs
|
|
# against each mutant, so a first full run takes hours; PIT's history in
|
|
# .pitest/ survives the clean and keeps later runs to the changed classes.
|
|
# Report only, no gate yet.
|
|
mutation:
|
|
trigger:
|
|
atTimes: ["00:00"]
|
|
branches: ["main"]
|
|
activeWithin: 24h
|
|
# it shares main's worktree with the test build and the deploy, which installs
|
|
# the runtime bundle the test build left in build/: cleaning all of build/
|
|
# broke the deploy queued behind this build (PR#94)
|
|
cleanCommand: rm -rf build/reports/pitest build/reports/codecharta
|
|
# the export before the gate, so a failing gate still leaves the code city of the methods to look at
|
|
buildCommand: ./gradlew --console=plain --no-daemon pitest mutationCrapCodeCharta mutationCrapCheck
|
|
# empty takes the host's executor.buildTimeout, the longest it allows
|
|
timeout: ""
|
|
statusContext: werkator/mutation
|
|
|