1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# .gitlab-ci.yml — pipeline assembled from phpboyscout/cicd components.
#
# merge_request_event → lint, test, security, docs (the merge gate)
# default branch → release-plz, zensical-pages deploy
#
# Quality gates live exclusively at the MR level — pushing to main runs
# release-plz (and the docs deploy), which itself opens an MR that gets
# the full gate before merge.
#
# Renovate runs from the group-level bot; no renovate-self include.
# release-plz runs `cargo-semver-checks` to vet public-API changes.
# Install via cargo-binstall, and give the Release-MR commit a bot
# identity (release-plz runs `git commit -s`).
.release-plz-setup: |
for i in 1 2 3; do
rm -rf /var/lib/apt/lists/*
apt-get update -qq && break
echo "apt-get update attempt $i failed; retrying in 5s..."
sleep 5
done
apt-get install -y --no-install-recommends git ca-certificates curl
rm -rf /var/lib/apt/lists/*
if ! command -v cargo-binstall >/dev/null 2>&1; then
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
fi
cargo binstall --no-confirm --no-symlinks --force cargo-semver-checks
git config --global user.email "release-plz@phpboyscout.uk"
git config --global user.name "release-plz bot"
include:
# Quality gates — MR-only by default. rust-toolchain.toml pins an
# exact stable which rustup installs over the image default.
- component: gitlab.com/phpboyscout/cicd/rust-lint@v0.29.0
- component: gitlab.com/phpboyscout/cicd/rust-test@v0.29.0
inputs:
enable_cross_os: true
enable_integration: false
enable_coverage: true
- component: gitlab.com/phpboyscout/cicd/rust-security@v0.29.0
- component: gitlab.com/phpboyscout/cicd/rust-docs@v0.29.0
# Docs microsite — deploys from main on every push.
- component: gitlab.com/phpboyscout/cicd/zensical-pages@v0.29.0
# Release driver — release-pr + release on main.
- component: gitlab.com/phpboyscout/cicd/release-plz@v0.29.0
inputs:
extra_before_script: *release-plz-setup
stages:
- lint
- test
- security
- docs
- pages
- release
variables:
CARGO_TERM_COLOR: "always"
RUSTFLAGS: "-D warnings"
# release-plz walks the full commit log to compute the Release MR.
GIT_DEPTH: "0"
# Shared-runner RAM cap; see rust-tool-base's CI perf spec P8. This
# repo's graph is small, so revisit upward once measured.
CARGO_BUILD_JOBS: "2"
default:
interruptible: true