committed by
GitHub
10 changed files with 113 additions and 17 deletions
Split View
Diff Options
-
47.github/ISSUE_TEMPLATE.md
-
13.gitlab-ci.yml
-
2roles/kubernetes-apps/ansible/defaults/main.yml
-
7roles/kubernetes-apps/ansible/tasks/calico-policy-controller.yml
-
10roles/kubernetes-apps/ansible/templates/calico-policy-controller.yml.j2
-
8roles/network_plugin/calico/templates/calicoctl-container.j2
-
3roles/network_plugin/flannel/defaults/main.yml
-
19roles/network_plugin/flannel/tasks/main.yml
-
6roles/network_plugin/flannel/templates/flannel-pod.yml
-
15scripts/premoderator.sh
@ -0,0 +1,47 @@ |
|||
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--> |
|||
|
|||
**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): |
|||
|
|||
<!-- |
|||
If this is a BUG REPORT, please: |
|||
- Fill in as much of the template below as you can. If you leave out |
|||
information, we can't help you as well. |
|||
|
|||
If this is a FEATURE REQUEST, please: |
|||
- Describe *in detail* the feature/behavior/change you'd like to see. |
|||
|
|||
In both cases, be ready for followup questions, and please respond in a timely |
|||
manner. If we can't reproduce a bug or think a feature already exists, we |
|||
might close your issue. If we're wrong, PLEASE feel free to reopen it and |
|||
explain why. |
|||
--> |
|||
|
|||
**Environment**: |
|||
- **Cloud provider or hardware configuration:** |
|||
|
|||
- **OS (`printf "$(uname -srm)\n$(cat /etc/os-release)\n"`):** |
|||
|
|||
- **Version of Ansible** (`ansible --version`): |
|||
|
|||
|
|||
**Kargo version (commit) (`git rev-parse --short HEAD`):** |
|||
|
|||
|
|||
**Network plugin used**: |
|||
|
|||
|
|||
**Copy of your inventory file:** |
|||
|
|||
|
|||
**Command used to invoke ansible**: |
|||
|
|||
|
|||
**Output of ansible run**: |
|||
<!-- We recommend using snippets services like https://gist.github.com/ etc. --> |
|||
|
|||
**Anything else do we need to know**: |
|||
<!-- By running scripts/collect-info.yaml you can get a lot of useful informations. |
|||
Script can be started by: |
|||
ansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml |
|||
(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python'). |
|||
After running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here.--> |
@ -0,0 +1,15 @@ |
|||
#!/bin/sh -eux -o pipefail |
|||
# A naive premoderation script to allow Gitlab CI pipeline on a specific PRs' comment |
|||
# Exits with 0, if the pipeline is good to go |
|||
|
|||
CURL_ARGS="-fs --connect-timeout 5 --max-time 5 --retry-max-time 20 --retry 4 --retry-delay 5" |
|||
MAGIC="${MAGIC:-ci check this}" |
|||
|
|||
# Get PR number from CI_BUILD_REF_NAME |
|||
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 |
|||
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 '"') |
|||
# 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}" |
Write
Preview
Loading…
Cancel
Save