forked from harness/harness
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
155576f
commit dfea14c
Showing
719 changed files
with
128,547 additions
and
34,572 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,13 @@ | ||
drone.sublime-project | ||
drone.sublime-workspace | ||
.vagrant | ||
|
||
*~ | ||
~* | ||
drone | ||
drone_* | ||
*.sqlite | ||
*.sqlite3 | ||
*.deb | ||
*.deb.* | ||
*.rpm | ||
*.out | ||
*.prof | ||
*.rice-box.go | ||
*.db | ||
*_gen.go | ||
*.html | ||
*.css | ||
*.txt | ||
*.min.css | ||
*.zip | ||
*.gz | ||
*.out | ||
*.min.js | ||
*_bindata.go | ||
*.toml | ||
|
||
# generate binaries | ||
cmd/drone-agent/drone-agent | ||
cmd/drone-build/drone-build | ||
cmd/drone-agent/drone-server | ||
|
||
# generated binaries in ./bin | ||
bin/drone | ||
bin/drone-agent | ||
bin/drone-build | ||
bin/drone-server | ||
|
||
# generated binaries in dpkg | ||
dist/drone/usr/local/bin/drone | ||
*.deb | ||
temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
FROM golang:1.4.2 | ||
# Build the drone executable on a x64 Linux host: | ||
# | ||
# go build --ldflags '-extldflags "-static"' -o drone_static | ||
# | ||
# | ||
# Alternate command for Go 1.4 and older: | ||
# | ||
# go build -a -tags netgo --ldflags '-extldflags "-static"' -o drone_static | ||
# | ||
# | ||
# Build the docker image: | ||
# | ||
# docker build --rm=true -t drone/drone . | ||
|
||
ENV DRONE_SERVER_PORT :80 | ||
WORKDIR $GOPATH/src/github.com/drone/drone | ||
FROM centurylink/ca-certs | ||
EXPOSE 8080 | ||
|
||
EXPOSE 80 | ||
ADD drone_static /drone_static | ||
|
||
ENTRYPOINT ["/usr/local/bin/drone"] | ||
CMD ["-config", "/tmp/drone.toml"] | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y libsqlite3-dev \ | ||
&& git clone git://github.com/gin-gonic/gin.git $GOPATH/src/github.com/gin-gonic/gin \ | ||
&& go get -u github.com/jteeuwen/go-bindata/... | ||
|
||
RUN touch /tmp/drone.toml | ||
|
||
ADD . . | ||
RUN make bindata deps \ | ||
&& make build \ | ||
&& mv bin/* /usr/local/bin/ \ | ||
&& rm -rf bin cmd/drone-server/drone_bindata.go | ||
ENTRYPOINT ["/drone_static"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,35 @@ | ||
.PHONY: dist | ||
.PHONY: vendor | ||
|
||
SHA := $(shell git rev-parse --short HEAD) | ||
VERSION := 0.4.0-alpha | ||
PACKAGES = $(shell go list ./... | grep -v /vendor/) | ||
|
||
all: build | ||
all: gen build | ||
|
||
deps: | ||
go get golang.org/x/tools/cmd/cover | ||
go get golang.org/x/tools/cmd/vet | ||
go get -u github.com/kr/vexp | ||
go get -u github.com/eknkc/amber/amberc | ||
go get -u github.com/jteeuwen/go-bindata/... | ||
go get -u github.com/elazarl/go-bindata-assetfs/... | ||
|
||
gen: | ||
go generate $(go list ./... | grep -v /vendor/) | ||
|
||
build: | ||
go run make.go bindata build | ||
|
||
|
||
# Execute the database test suite against mysql 5.5 | ||
# | ||
# You can launch a mysql container locally for testing: | ||
# docker run -rm -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=test -p 3306:3306 mysql:5.5 | ||
test_mysql: | ||
mysql -P 3306 --protocol=tcp -u root -e 'create database if not exists test;' | ||
TEST_DRIVER="mysql" TEST_DATASOURCE="root@tcp(127.0.0.1:3306)/test" go test -short github.com/drone/drone/pkg/store/builtin | ||
mysql -P 3306 --protocol=tcp -u root -e 'drop database test;' | ||
|
||
run: | ||
bin/drone --debug | ||
|
||
# installs the drone binaries into bin | ||
install: | ||
install -t /usr/local/bin bin/drone | ||
install -t /usr/local/bin bin/drone-agent | ||
|
||
docker: | ||
docker build --file=cmd/drone-build/Dockerfile.alpine --rm=true -t drone/drone-build . | ||
|
||
# creates a debian package for drone | ||
# to install `sudo dpkg -i drone.deb` | ||
dist: | ||
mkdir -p dist/drone/usr/local/bin | ||
mkdir -p dist/drone/var/lib/drone | ||
mkdir -p dist/drone/var/cache/drone | ||
cp bin/drone dist/drone/usr/local/bin | ||
-dpkg-deb --build dist/drone | ||
GO15VENDOREXPERIMENT=1 go build | ||
|
||
build_static: | ||
GO15VENDOREXPERIMENT=1 go build --ldflags '-extldflags "-static"' -o drone_static | ||
|
||
test: | ||
go test -cover $(PACKAGES) | ||
|
||
deb: | ||
mkdir -p contrib/debian/drone/usr/local/bin | ||
mkdir -p contrib/debian/drone/var/lib/drone | ||
mkdir -p contrib/debian/drone/var/cache/drone | ||
cp drone contrib/debian/drone/usr/local/bin | ||
-dpkg-deb --build contrib/debian/drone | ||
|
||
vendor: | ||
vexp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// +build ignore | ||
|
||
// This program converts amber templates to standard | ||
// Go template files. | ||
|
||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// +build ignore | ||
|
||
// This program minifies JavaScript files | ||
// $ go run generate-js.go -dir scripts/ -out scripts/drone.min.js | ||
|
||
package main | ||
|
||
import ( | ||
"bytes" | ||
"flag" | ||
"fmt" | ||
"io" | ||
"io/ioutil" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/dchest/jsmin" | ||
) | ||
|
||
var ( | ||
dir = flag.String("dir", "scripts/", "") | ||
out = flag.String("o", "scripts/drone.min.js", "") | ||
) | ||
|
||
func main() { | ||
flag.Parse() | ||
|
||
var buf bytes.Buffer | ||
|
||
// walk the directory tree and write all | ||
// javascript files to the buffer. | ||
filepath.Walk(*dir, func(path string, info os.FileInfo, err error) error { | ||
if filepath.Ext(path) != ".js" { | ||
return nil | ||
} | ||
|
||
f, err := os.Open(path) | ||
if err != nil { | ||
return nil | ||
} | ||
defer f.Close() | ||
|
||
// write the file name to the minified output | ||
fmt.Fprintf(&buf, "// %s\n", path) | ||
|
||
// copy the file to the buffer | ||
_, err = io.Copy(&buf, f) | ||
return err | ||
}) | ||
|
||
// minifies the javascript | ||
data, err := jsmin.Minify(buf.Bytes()) | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
|
||
// write the minified output | ||
ioutil.WriteFile(*out, data, 0700) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
cd /tmp | ||
|
||
curl -O https://www.sqlite.org/2015/sqlite-autoconf-3081101.tar.gz | ||
tar xzf sqlite-autoconf-3081101.tar.gz | ||
cd sqlite-autoconf-3081101 | ||
cd sqlite-3.6.421 | ||
./configure -prefix=/scratch/usr/local | ||
make | ||
make install |
Oops, something went wrong.