Merge pull request #854 from bogdando/pipeline

Fix pipeline premoderation/unit-tests
pull/759/merge
Bogdan Dobrelya 2017-01-04 18:00:48 +01:00 committed by GitHub
commit aa79a02f9c
2 changed files with 3 additions and 2 deletions

View File

@ -415,7 +415,7 @@ syntax-check:
script: script:
- ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
- /bin/sh scripts/premoderator.sh - /bin/sh scripts/premoderator.sh
except: ['triggers'] except: ['triggers', 'master']
tox-inventory-builder: tox-inventory-builder:
stage: unit-tests stage: unit-tests
@ -424,4 +424,4 @@ tox-inventory-builder:
- pip install tox - pip install tox
- cd contrib/inventory_builder && tox - cd contrib/inventory_builder && tox
when: manual when: manual
except: ['triggers'] except: ['triggers', 'master']

View File

@ -11,4 +11,5 @@ issue=$(echo ${CI_BUILD_REF_NAME} | perl -ne '/^pr-(\d+)-\S+$/ && print $1')
user=$(curl ${CURL_ARGS} "https://api.github.com/repos/kubernetes-incubator/kargo/issues/${issue}/comments" \ user=$(curl ${CURL_ARGS} "https://api.github.com/repos/kubernetes-incubator/kargo/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
[ "$user" != "null" ] || exit 1
curl ${CURL_ARGS} "https://api.github.com/orgs/kubernetes-incubator/members/${user}" curl ${CURL_ARGS} "https://api.github.com/orgs/kubernetes-incubator/members/${user}"