Skip to content

Commit

Permalink
chore(development env): unified the DinD development environment (#33)
Browse files Browse the repository at this point in the history
* chore(development env): unified the DinD development environment

* export dashboard's svc as cluster service

* ignore data directory

* mount a host directory as registry storage directory

* write bind mount info to /etc/fstab

* Wait for the all apps to be ready

* bump local-volume-provisioner version to v2.2.0

* set the retry time to 600

* add a script for checkout a tidb-operator PR branch in a forked repo
  • Loading branch information
onlymellb committed Aug 21, 2018
1 parent 3a230d2 commit 5598b81
Show file tree
Hide file tree
Showing 7 changed files with 2,228 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@ images/tidb-operator-e2e/tidb-cluster/
images/tidb-operator-e2e/tidb-operator/
*.tar
tmp/
data/
.idea

# ginkgo test coverage
Expand Down
29 changes: 29 additions & 0 deletions checkout-pr-branch.sh
@@ -0,0 +1,29 @@
#!/bin/bash

# This script is used to checkout a tidb-operator PR branch in a forked repo.
if [[ -z ${1:-} ]]; then
echo "\
This script is used to checkout a tidb-operator PR branch in a forked repo
Usage:
checkout-pr-branch.sh [github-username]:[pr-branch]
The argument can be copied directly from github PR page.
The local branch name would be [github-username]/[pr-branch].\
" >&2
exit
fi

username=$(echo ${1} | cut -d':' -f1)
branch=$(echo ${1} | cut -d':' -f2)
local_branch=${username}/${branch}
fork="https://github.com/${username}/tidb-operator"

exists=`git show-ref refs/heads/${local_branch}`
if [[ -n ${exists} ]]; then
git checkout ${local_branch}
git pull ${fork} ${branch}:${local_branch}
else
git fetch ${fork} ${branch}:${local_branch}
git checkout ${local_branch}
fi

0 comments on commit 5598b81

Please sign in to comment.