Skip to content

Commit

Permalink
Update sync_org.sh to provide commands to dump the org. (kubeflow#79)
Browse files Browse the repository at this point in the history
* Add greynutw, yuzisun, and joeliedtke. THey were already added to the
  org but not the YAML file.
  • Loading branch information
jlewi authored and k8s-ci-robot committed Apr 8, 2019
1 parent fda5eaf commit d5455c2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
3 changes: 3 additions & 0 deletions github-orgs/kubeflow/org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ orgs:
- gaocegege
- gaoning777
- garganubhav
- greynutw
- gsunner
- gyliu513
- hamelsmu
Expand All @@ -93,6 +94,7 @@ orgs:
- Jimexist
- jinchihe
- jinxingwang
- joeliedtke
- johnugeorge
- jose5918
- jzp1025
Expand Down Expand Up @@ -170,6 +172,7 @@ orgs:
- yph152
- YujiOshima
- yupbank
- yuzisun
- zhenghuiwang
- ziamsyed
- zjj2wry
Expand Down
32 changes: 22 additions & 10 deletions github-orgs/sync_org.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ parseArgs() {
done
}


action=$1
shift
parseArgs $*

usage() {
echo "sync_org.sh --test_infra_dir=<kubernetes-test-infra-dir> --token_file=<path-to-github-token> [--confirm] [--admins]"
echo "sync_org.sh <command> --test_infra_dir=<kubernetes-test-infra-dir> --token_file=<path-to-github-token> [--confirm] [--admins]"
}

if [ -z ${test_infra_dir} ]; then
Expand All @@ -55,12 +58,21 @@ if ${admins}; then
FIX_ADMINS=--fix-org-members
fi

bazel run //prow/cmd/peribolos -- --fix-org-members ${FIX_ADMINS} --config-path ${DIR}/kubeflow/org.yaml \
--github-token-path ${token_file} \
--required-admins=jlewi \
--required-admins=abhi-g \
--required-admins=google-admin \
--required-admins=googlebot \
--required-admins=richardsliu \
--required-admins=vicaire \
--confirm=${confirm}
if [ "${action}" == "dump" ]; then
#bazel run //prow/cmd/peribolos -- --help
bazel run //prow/cmd/peribolos -- --dump=kubeflow \
--github-token-path ${token_file} > --config-path ${DIR}/kubeflow/org.yaml
elif [ "${action}" == "sync" ]; then
bazel run //prow/cmd/peribolos -- --fix-org-members ${FIX_ADMINS} --config-path ${DIR}/kubeflow/org.yaml \
--github-token-path ${token_file} \
--required-admins=jlewi \
--required-admins=abhi-g \
--required-admins=google-admin \
--required-admins=googlebot \
--required-admins=richardsliu \
--required-admins=vicaire \
--confirm=${confirm}
else
echo "command=${action} is not a valid command; valid commands are dump and sync"
exit 1
fi

0 comments on commit d5455c2

Please sign in to comment.