Skip to content

Instantly share code, notes, and snippets.

@masahide
Created April 10, 2014 11:21
Show Gist options
  • Save masahide/10370237 to your computer and use it in GitHub Desktop.
Save masahide/10370237 to your computer and use it in GitHub Desktop.
EC2上にdrone.ioのオープンソース版を載せて「Rebuild」ボタンを追加するパッチを当てる ref: http://qiita.com/yamasaki-masahide/items/686e20b614c838201636
ubuntu@drone:~$ cat /etc/default/docker
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4"
DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
# Upstart configuration file for droned.
# Command line options:
#
# -datasource="drone.sqlite":
# -driver="sqlite3":
# -path="":
# -port=":8080":
#
#DRONED_OPTS="--port=:80"
DRONED_OPTS="-port=:80 -log.debug=true"
sudo aptitude update
sudo aptidude install -y linux-image-generic-lts-raring linux-headers-generic-lts-raring
sudo shutdown -r now
tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz
cat >>~/.bash_profile <<EOS
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
EOS
source ~/.bash_profile
mkdir -p ~/go/src/github.com/drone/
cd ~/go/src/github.com/drone/
git clone git@github.com:drone/drone.git && cd drone
git fetch origin +refs/pull/158/head:refs/remotes/origin/pr/158
git checkout -qf -b pr/158 origin/pr/158
--- a/pkg/model/repo.go
+++ b/pkg/model/repo.go
@@ -24,7 +24,7 @@ const (
)
const (
- githubRepoPattern = "git://%s/%s/%s.git"
+ githubRepoPattern = "git@%s:%s/%s.git"
githubRepoPatternPrivate = "git@%s:%s/%s.git"
bitbucketRepoPattern = "https://bitbucket.org/%s/%s.git"
bitbucketRepoPatternPrivate = "git@bitbucket.org:%s/%s.git"
sudo aptitude install -y git mercurial bzr build-essential
make deps
make && make test
sudo make install
sudo start drone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment