Skip to content

Commit

Permalink
Add cloudbuild support. Go back to bundling dependencies since this i…
Browse files Browse the repository at this point in the history
…s clearly the path of least resistence.
  • Loading branch information
ncabatoff committed Aug 26, 2018
1 parent 5f2f84f commit 63c4ff0
Show file tree
Hide file tree
Showing 211 changed files with 51,109 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,4 +1,3 @@
.*.sw?
process-exporter
dist
vendor/
4 changes: 4 additions & 0 deletions Dockerfile.cloudbuild
@@ -0,0 +1,4 @@
FROM scratch
COPY gopath/bin/process-exporter /process-exporter
ENTRYPOINT ["/process-exporter"]
EXPOSE 9256
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -32,6 +32,10 @@ integ:
@echo ">> smoke testing process-exporter"
./process-exporter $(INTEG_TEST)

install:
@echo ">> installing binary"
cd cmd/process-exporter; CGO_ENABLED=0 go install -a -tags netgo

docker:
@echo ">> building docker image"
docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
Expand Down
32 changes: 32 additions & 0 deletions cloudbuild.yaml
@@ -0,0 +1,32 @@
steps:
# - name: string
# args: string
# env: string
# dir: string
# id: string
# waitFor: string
# entrypoint: string
# secretEnv: string
# - name: gcr.io/cloud-builders/curl
# args: ['-L', '-s', '-o', 'dep', 'https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64']
# - name: ubuntu
# args: ['chmod', '+x', 'dep']
# Setup the workspace
- name: gcr.io/cloud-builders/go
env: ['PROJECT_ROOT=github.com/ncabatoff/process-exporter']
args: ['env']
# Run dep in the workspace created in previous step
# - name: gcr.io/cloud-builders/go
# entrypoint: /bin/sh
# dir: gopath/src/github.com
# env: ['GOPATH=/workspace/gopath']
# args: ['-c', 'cd ncabatoff/process-exporter && /workspace/dep ensure -vendor-only' ]
- name: gcr.io/cloud-builders/go
entrypoint: /bin/sh
dir: gopath/src/github.com
env: ['GOPATH=/workspace/gopath']
args: ['-c', 'cd ncabatoff/process-exporter && make style vet test build integ install' ]
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--tag=gcr.io/$PROJECT_ID/process-exporter', '.', '-f', 'Dockerfile.cloudbuild']
images: ['gcr.io/$PROJECT_ID/process-exporter']

20 changes: 20 additions & 0 deletions vendor/github.com/beorn7/perks/LICENSE

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

0 comments on commit 63c4ff0

Please sign in to comment.