Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,28 @@ jobs:
EL: ${{ matrix.el }}
run: make -C rpm test EL="$EL"

go-generated:
# On a Renovate branch, pushes the regenerated code itself.
uses: scality/workflows/.github/workflows/go-generated.yaml@1c3bb83b992d0a512c08755606ee6439b26c463b # v2.13.0
secrets:
ACTIONS_APP_PRIVATE_KEY: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }}
with:
working-directory: agent
commands: |
go mod tidy
go generate ./...
make manifests generate
push-to-renovate-branches: true
actions-app-id: ${{ vars.ACTIONS_APP_ID }}

pre-merge:
name: Pre Merge
# Single check for rulesets to require: GitHub reports one check per job, never one per workflow
# always(): a job skipped because a dependency failed reports success and would let the PR merge
if: always()
needs:
- lint
- go-generated
- test
- image
- e2e
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ make -C rpm rpm EL=9 # build both RPMs into rpm/_build/
- **Generated code is committed.** After touching the API types or the RBAC
markers, run `make -C agent manifests generate` and commit the result. CI
regenerates it before running the tests, and fails if the result differs
from what is committed. A controller-gen bump needs the same step.
from what is committed. A controller-gen bump needs the same step: on a
`renovate/*` branch, the `go-generated` job runs `go mod tidy`,
`go generate ./...` and `make manifests generate` in `agent/`, and pushes
the result itself.
- **Logging**: `logr` through controller-runtime, with the `logcheck` linter
enforcing balanced key-value pairs. Log a value once, at the level that owns
it: the reconciler logs outcomes, the packages it calls return errors.
Expand Down
Loading