userid-validation: simplify label arguments
Use the concise explicit arguments rather than constructing a label.
```
$ ssh openbmc.gerrit gerrit review --help
...
--ok-to-test N : score for Ok-To-Test
0 No score
+1 Ok to Test
```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0b1013de71b40d2bd20d6fb09a376e9b64400b9a
diff --git a/jenkins/userid-validation b/jenkins/userid-validation
index fc882ee..026b877 100755
--- a/jenkins/userid-validation
+++ b/jenkins/userid-validation
@@ -26,7 +26,7 @@
echo "Unable to find committer."
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=0 "--message='Unable to determine committer'"
+ --ok-to-test=0 "--message='Unable to determine committer'"
exit 1
fi
@@ -39,14 +39,14 @@
echo "Unable to determine github user for ${COMMITTER_EMAIL}."
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=0 "--message='Unable to determine github user'"
+ --ok-to-test=0 "--message='Unable to determine github user'"
exit 1
fi
# Reset the vote to 0 so jenkins will detect a new +1 on retriggers
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=0 -t autogenerated:jenkins
+ --ok-to-test=0 -t autogenerated:jenkins
# Write full list of users to a file
GERRIT_CI_GROUPS=( \
@@ -93,13 +93,13 @@
if grep -q -w "${COMMITTER_USERNAME}" "$WORKSPACE/users.txt"; then
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=1 -t autogenerated:jenkins \
+ --ok-to-test=1 -t autogenerated:jenkins \
"--message='User approved, CI ok to start'"
# Immediately erase the score to prevent infinite triggers.
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=0 -t autogenerated:jenkins
+ --ok-to-test=0 -t autogenerated:jenkins
exit 0
fi
@@ -107,7 +107,7 @@
echo "${COMMITTER_USERNAME} is not on the approved list."
"${GERRIT_SSH_CMD[@]}" review \
"${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER}" \
- --label=Ok-To-Test=0 -t autogenerated:jenkins \
+ --ok-to-test=0 -t autogenerated:jenkins \
"--message='User not approved, see admin, no CI'"
exit 0