Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #67 from square/cs/vendor
Browse files Browse the repository at this point in the history
Checked-in vendor/ directory
  • Loading branch information
csstaub committed Jun 29, 2016
2 parents f57597b + 6834fc9 commit 73260f7
Show file tree
Hide file tree
Showing 589 changed files with 163,765 additions and 22 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ eclipsebin
*.iws
*.out
.DS_Store
vendor/
keywhiz-fs
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
language: go

sudo: required
Expand All @@ -13,14 +14,13 @@ before_script:
- go vet

before_install:
- go get github.com/Masterminds/glide
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- sudo apt-get install fuse

install:
- make build
- make keywhiz-fs
- docker build -t square/keywhiz-fs .

script:
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ MAINTAINER Diogo Monica "diogo@docker.com"

# Install sshfs and dependencies
RUN apt-get update && \
apt-get install -y sshfs sudo make git --no-install-recommends && \
go get github.com/Masterminds/glide
apt-get install -y sshfs sudo make --no-install-recommends

# Add keywhiz user and group
RUN useradd -ms /bin/false keywhiz
Expand All @@ -15,8 +14,8 @@ COPY . /go/src/github.com/square/keywhiz-fs

# Install keywhizfs
RUN cd /go/src/github.com/square/keywhiz-fs && \
glide install && \
go install .
make keywhiz-fs && \
cp keywhiz-fs /go/bin/keywhiz-fs

# Allows keywhiz-fs to expose its filesystems to other users besides the owner of the process
RUN echo "user_allow_other" >> /etc/fuse.conf
Expand Down
19 changes: 6 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# Required for vendoring
export GO15VENDOREXPERIMENT = 1
# Required for os/user to work on cross-compile
export CGO_ENABLED = 1

BUILD_TIME := $(shell date +%s)
BUILD_REVISION := $(shell git rev-parse --verify HEAD)
BUILD_MACHINE := $(shell uname -mnrs)

SOURCE_FILES := $(shell find . \( -name '*.go' -not -path './vendor/*' \))

# Build
build: depends
keywhiz-fs: $(SOURCE_FILES)
go build -ldflags "-s -w \
-X \"main.buildTime=$(BUILD_TIME)\" \
-X \"main.buildRevision=$(BUILD_REVISION)\" \
-X \"main.buildMachine=$(BUILD_MACHINE)\""

# Dependencies
depends:
glide -q install

update-depends:
glide -q update

# Run all tests
test: unit

unit:
test:
go test -v -coverprofile coverage.out

.PHONY: test
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ KeywhizFs will display all secrets under the top level directory of the mountpoi

# Building

Install glide (`go get github.com/Masterminds/glide` or `brew install glide` if you are on Mac OS X).
Run `make keywhiz-fs` to build a binary and `make test` to run tests.

Run `make build` to build a binary and `make test` to run tests.
We use [glide][1] to manage vendored dependencies.

[1]: https://glide.sh

# Running

Expand Down
27 changes: 27 additions & 0 deletions vendor/github.com/alecthomas/template/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions vendor/github.com/alecthomas/template/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 73260f7

Please sign in to comment.