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:
@@ -160,7 +160,63 @@
|
|||||||
password: secret
|
password: secret
|
||||||
status_code: 201
|
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:
|
shell:
|
||||||
executable: /bin/sh
|
executable: /bin/sh
|
||||||
chdir: "{{ project_tmp.stdout }}"
|
chdir: "{{ project_tmp.stdout }}"
|
||||||
@@ -205,7 +261,7 @@
|
|||||||
|
|
||||||
- name: Post a sample failure review
|
- name: Post a sample failure review
|
||||||
uri:
|
uri:
|
||||||
url: 'http://localhost:8081/a/changes/{{ item }}/revisions/1/review'
|
url: 'http://localhost:8081/a/changes/{{ item.id }}/revisions/1/review'
|
||||||
method: POST
|
method: POST
|
||||||
user: zuul
|
user: zuul
|
||||||
password: secret
|
password: secret
|
||||||
@@ -213,7 +269,9 @@
|
|||||||
body:
|
body:
|
||||||
tag: 'autogenerated:zuul:check'
|
tag: 'autogenerated:zuul:check'
|
||||||
labels:
|
labels:
|
||||||
'Verified': -2
|
'Verified': '{{ item.verified }}'
|
||||||
|
'Review-Priority': '{{ item.priority }}'
|
||||||
|
'Backport-Candidate': '{{ item.backport }}'
|
||||||
message: |
|
message: |
|
||||||
Build failed (check pipeline). For information on how to proceed, see
|
Build failed (check pipeline). For information on how to proceed, see
|
||||||
https://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing
|
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-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
|
- test-error https://zuul.opendev.org/t/openstack/build/0897bedc9743580794652fc49e3c1234 : ERROR This is an error message in {{ range(1, 59) | random }}m 32s
|
||||||
loop:
|
loop:
|
||||||
- 1
|
- id: '1'
|
||||||
- 2
|
verified: '-2'
|
||||||
- 3
|
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
|
- name: Post a sample good review in another pipeline
|
||||||
uri:
|
uri:
|
||||||
|
|||||||
Reference in New Issue
Block a user