Skip to content
Snippets Groups Projects
Unverified Commit 92274a74 authored by Andreas Krüger's avatar Andreas Krüger Committed by GitHub
Browse files

Merge pull request #3777 from kubernetes-sigs/woopstar-patch-1

Fix path to Kubespray in CI auth check
parents 551317f1 1739c479
Branches
Tags
No related merge requests found
...@@ -8,11 +8,11 @@ MAGIC="${MAGIC:-ci check this}" ...@@ -8,11 +8,11 @@ MAGIC="${MAGIC:-ci check this}"
# Get PR number from CI_BUILD_REF_NAME # Get PR number from CI_BUILD_REF_NAME
issue=$(echo ${CI_BUILD_REF_NAME} | perl -ne '/^pr-(\d+)-\S+$/ && print $1') issue=$(echo ${CI_BUILD_REF_NAME} | perl -ne '/^pr-(\d+)-\S+$/ && print $1')
# Get the user name from the PR comments with the wanted magic incantation casted # Get the user name from the PR comments with the wanted magic incantation casted
user=$(curl ${CURL_ARGS} "https://api.github.com/repos/kubernetes-incubator/kubespray/issues/${issue}/comments" \ user=$(curl ${CURL_ARGS} "https://api.github.com/repos/kubernetes-sigs/kubespray/issues/${issue}/comments" \
| jq -M "map(select(.body | contains (\"$MAGIC\"))) | .[0] .user.login" | tr -d '"') | jq -M "map(select(.body | contains (\"$MAGIC\"))) | .[0] .user.login" | tr -d '"')
# Check for the required user group membership to allow (exit 0) or decline (exit >0) the pipeline # Check for the required user group membership to allow (exit 0) or decline (exit >0) the pipeline
if [ "$user" = "null" ]; then if [ "$user" = "null" ]; then
echo "User does not have permissions to start CI run" echo "User does not have permissions to start CI run"
exit 1 exit 1
fi fi
curl ${CURL_ARGS} "https://api.github.com/orgs/kubernetes-incubator/members/${user}" curl ${CURL_ARGS} "https://api.github.com/orgs/kubernetes-sigs/members/${user}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment