Teach ci/init-external-repos.sh to consider user permissions

Any errors while setting up external/private test repo should fail the
task for PRs submitted by a user with write/admin permission.
This commit is contained in:
Jon Siwek 2021-03-31 10:29:17 -07:00
parent f75da8bb08
commit ade37c1dfc
3 changed files with 15 additions and 2 deletions

View file

@ -1,4 +1,11 @@
4.1.0-dev.448 | 2021-03-31 10:29:17 -0700
* Teach ci/init-external-repos.sh to consider user permissions (Jon Siwek, Corelight)
Any errors while setting up external/private test repo should fail the
task for PRs submitted by a user with write/admin permission.
4.1.0-dev.447 | 2021-03-31 09:55:05 -0700 4.1.0-dev.447 | 2021-03-31 09:55:05 -0700
* CI: Add OpenSUSE Leap 15.2 (Johanna Amann, Corelight) * CI: Add OpenSUSE Leap 15.2 (Johanna Amann, Corelight)

View file

@ -1 +1 @@
4.1.0-dev.447 4.1.0-dev.448

View file

@ -39,7 +39,13 @@ if [[ -n "${CIRRUS_CI}" ]] && [[ ! -d zeek-testing-private ]]; then
# the key is also available in PRs for people with write access to the # the key is also available in PRs for people with write access to the
# repo, so we can still try for those cases). # repo, so we can still try for those cases).
if [[ -n "${CIRRUS_PR}" ]]; then if [[ -n "${CIRRUS_PR}" ]]; then
if [[ "${CIRRUS_USER_PERMISSION}" == "write" ]]; then
set -e
elif [[ "${CIRRUS_USER_PERMISSION}" == "admin" ]]; then
set -e
else
set +e set +e
fi
else else
set -e set -e
fi fi