@@ -13,102 +13,23 @@ This is kubernetes/test-infra, which contains tools and configuration files for
1313- ** Gopherage** : Go coverage file manipulation (gopherage/)
1414- ** Experiment** : One-off tools and scripts (experiment/)
1515
16- Note: Prow source code moved to kubernetes-sigs/prow in April 2024. This repo now contains prow job configurations and test-infra specific tooling.
16+ ## Agents Rules
1717
18- ## Building and Testing
19-
20- ### Running Tests
21-
22- ``` bash
23- # Run all tests (Go + Python unit tests)
24- make test
25-
26- # Run only Go unit tests
27- make go-unit
28-
29- # Run only Python unit tests
30- make py-unit
31-
32- # Test a specific Go package or folder
33- hack/make-rules/go-test/unit.sh < folder>
34- # Examples:
35- hack/make-rules/go-test/unit.sh kettle/...
36- hack/make-rules/go-test/unit.sh pkg/benchmarkjunit/...
37- ```
38-
39- ### Verification and Linting
40-
41- ``` bash
42- # Run all verification checks
43- make verify
44-
45- # Run specific verifications
46- make go-lint # golangci-lint checks
47- make verify-gofmt # Go formatting
48- make verify-eslint # TypeScript/JavaScript linting
49- make py-lint # Python linting
50- make verify-boilerplate # License header checks
51- make verify-yamllint # YAML linting
52- make verify-spelling # Spell checking
53- make verify-labels # GitHub label validation
54- make verify-file-perms # File permission checks
55- make verify-generated-jobs # Verify generated jobs are up to date
56- ```
18+ - Do not remove configurations in config/jobs without explict instruction from user
5719
58- ### Auto-fixing Issues
20+ - If promoted to commit changes, commit messages should not acknowledge use of agent via < Co-Authored By > or < Generated By >.
5921
60- ``` bash
61- # Auto-format Go code
62- make update-gofmt
63-
64- # Update Go dependencies (after changing go.mod)
65- make update-go-deps
66-
67- # Auto-fix spelling mistakes
68- make update-spelling
69-
70- # Update file permissions
71- make update-file-perms
22+ ## Building and Testing
7223
73- # Regenerate generated job configs
74- make generate-jobs
75- ```
24+ @CONTRIBUTING .md
7625
7726## Dependency Management
7827
79- This repo uses Go modules. Key rules:
80-
81- - ** NEVER add ` replace ` directives to go.mod** - this breaks published packages
82- - Run ` make update-go-deps ` after modifying go.mod
83- - Use ` hack/make-rules/go-run/arbitrary.sh go <command> ` instead of ` go <command> ` to ensure correct Go version (1.25.3)
84- - See docs/dep.md for complete details
28+ @docs/deps .md
8529
8630## Working with Prow Jobs
8731
88- Job configurations live in ` config/jobs/ ` . The directory structure is:
89- - ` org/repo/filename.yaml ` for most repos
90- - ` kubernetes/sig-foo/filename.yaml ` for kubernetes/kubernetes jobs
91-
92- ### Job Types
93-
94- - ** Presubmits** : Run on PRs before merge
95- - ** Postsubmits** : Run after code is merged
96- - ** Periodics** : Run on a schedule
97-
98- ### Adding or Updating Jobs
99-
100- 1 . Create/edit YAML in config/jobs/ following the org/repo structure
101- 2 . Ensure an OWNERS file exists in the directory
102- 3 . Add testgrid annotations to display results:
103- ``` yaml
104- annotations :
105- testgrid-dashboards : sig-foo-bar
106- testgrid-tab-name : pull-verify
107- ` ` `
108- 4. Open PR - changes auto-deploy when merged
109- 5. Optionally test locally: ` config/mkpj.sh` or `config/pj-on-kind.sh`
110-
111- See config/jobs/README.md for comprehensive job configuration guide.
32+ @config/jobs /README.md
11233
11334### Generated Jobs
11435
@@ -121,36 +42,7 @@ Always run `make verify-generated-jobs` before submitting PRs.
12142
12243## TestGrid Configuration
12344
124- TestGrid displays test results at testgrid.k8s.io. Two ways to configure :
125-
126- 1. **Simple (recommended)** : Add annotations to prow job YAML:
127- ` ` ` yaml
128- annotations:
129- testgrid-dashboards: sig-testing-misc
130- testgrid-tab-name: pull-verify
131- ` ` `
132-
133- 2. **Advanced** : Edit testgrid/config.yaml directly
134-
135- See testgrid/README.md and testgrid/config.md for details.
136-
137- # # Image Building
138-
139- ` ` ` bash
140- # Build all misc images (local)
141- make build-misc-images
142-
143- # Build single image (local)
144- make build-single-image PROW_IMAGE=<image-name>
145-
146- # Push all misc images to registry
147- make push-misc-images REGISTRY=gcr.io/k8s-staging-test-infra
148-
149- # Push single image to registry
150- make push-single-image PROW_IMAGE=<image-name> REGISTRY=gcr.io/k8s-staging-test-infra
151- ` ` `
152-
153- Images are configured in .test-infra-misc-images.yaml
45+ @testgrid/README .md
15446
15547## Repository Structure
15648
@@ -184,41 +76,18 @@ Key directories:
18476## Common Workflows
18577
18678### Updating Job Configs
79+
187801 . Edit YAML in config/jobs/org/repo/
188812 . Run ` make verify ` to check for issues
189823 . Commit and open PR
190834 . Changes auto-deploy on merge
19184
19285### Adding New Release Branch Jobs
86+
19387``` bash
19488go run ./releng/config-forker \
19589 --job-config $( pwd) /config/jobs \
19690 --version 1.27 \
19791 --go-version 1.20.2 \
19892 --output $( pwd) /config/jobs/kubernetes/sig-release/release-branch-jobs/1.27.yaml
19993```
200-
201- # ## Testing Locally
202- ` ` ` bash
203- # Test prow job config locally
204- config/pj-on-kind.sh
205-
206- # Create prowjob CR from local config
207- config/mkpj.sh
208- ` ` `
209-
210- # # CI and PR Workflow
211-
212- - All PRs checked by presubmit jobs configured in config/jobs/
213- - Use `/test <job-name>` to trigger specific jobs
214- - Use `/retest` to re-run failed jobs
215- - Jobs automatically deployed when PRs merge to master
216- - Use `/hold` to prevent auto-merge, `/hold cancel` to release
217- - Use `/cc @person` or `/assign @person` to notify reviewers
218- - See https://prow.k8s.io/command-help for all bot commands
219-
220- # # Contact
221-
222- - SIG Testing owns this repo
223- - Slack : # sig-testing, #testing-ops, #prow, #testgrid
224-
0 commit comments