system-config-run-review : add review priority and backport labels

Adding these two labels to the test project gives us better coverage
of the copyCondition and submit-requirment setup of projects.

Review-Priority is voting, so has a blocking s-r.  Backport-Candidate
is an example of a non-voting (or "trigger" as gerrit calls it) label,
which should show up in a different part of the UI.

This should help us better evaluate any changes in this area,
particularly UI changes via our test screenshots.

Change-Id: Ib42fa61d9805d1946da7307f0969cdaf6a937514
This commit is contained in:
Ian Wienand 2022-12-19 16:13:47 +11:00
parent b61c9edf66
commit 927d5730b8
No known key found for this signature in database

View File

@ -160,7 +160,63 @@
password: secret
status_code: 201
- name: Create initial commit and change in testproject
- name: Setup initial test project
shell:
executable: /bin/bash
chdir: "{{ project_tmp.stdout }}"
cmd: |
set -xe
git init testproject.config
pushd testproject.config
git remote add origin http://admin:secret@localhost:8081/a/y/testproject
git pull origin refs/meta/config
echo "{{ group_json.id }} CI-tools" >> groups # noqa 203
cat >project.config <<EOF
[access]
inheritFrom = All-Projects
[submit]
action = inherit
[access "refs/heads/*"]
label-Review-Priority = -1..+2 group CI-tools
label-Backport-Candidate = -1..+1 group CI-tools
[label "Review-Priority"]
copyCondition = changekind:NO_CODE_CHANGE OR changekind:TRIVIAL_REBASE OR is:MAX OR is:MIN
defaultValue = 0
function = NoBlock
value = -1 Branch Freeze
value = 0 No Priority
value = +1 Important Change
value = +2 Urgent Change
[label "Backport-Candidate"]
copyCondition = changekind:NO_CODE_CHANGE OR changekind:TRIVIAL_REBASE OR is:MAX OR is:MIN
defaultValue = 0
function = NoBlock
value = -1 Not a backport candidate
value = 0 Backport review needed
value = +1 Should backport
[submit-requirement "Review-Priority"]
description = The review priority
submittableIf = -label:Review-Priority=MIN
[submit-requirement "Backport-Candidate"]
applicableIf = is:false
description = Backport candidate status
submittableIf = is:true
EOF
git add project.config groups
git commit -m 'Updated project config'
git push origin HEAD:refs/meta/config
- name: Create initial commit and changes in testproject
shell:
executable: /bin/sh
chdir: "{{ project_tmp.stdout }}"
@ -205,7 +261,7 @@
- name: Post a sample failure review
uri:
url: 'http://localhost:8081/a/changes/{{ item }}/revisions/1/review'
url: 'http://localhost:8081/a/changes/{{ item.id }}/revisions/1/review'
method: POST
user: zuul
password: secret
@ -213,7 +269,9 @@
body:
tag: 'autogenerated:zuul:check'
labels:
'Verified': -2
'Verified': '{{ item.verified }}'
'Review-Priority': '{{ item.priority }}'
'Backport-Candidate': '{{ item.backport }}'
message: |
Build failed (check pipeline). For information on how to proceed, see
https://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing
@ -232,9 +290,18 @@
- test-disk-full https://zuul.opendev.org/t/openstack/build/0897fafc9743580794652fc49e3c9baf : DISK_FULL in {{ range(1, 59) | random }}m 48s
- test-error https://zuul.opendev.org/t/openstack/build/0897bedc9743580794652fc49e3c1234 : ERROR This is an error message in {{ range(1, 59) | random }}m 32s
loop:
- 1
- 2
- 3
- id: '1'
verified: '-2'
priority: '-1'
backport: '-1'
- id: '2'
verified: '+1'
priority: '+1'
backport: '0'
- id: '3'
verified: '+2'
priority: '+2'
backport: '+1'
- name: Post a sample good review in another pipeline
uri: