Skip to content

Commit

Permalink
Modern build + jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
onorua committed Jul 27, 2017
1 parent 107f51b commit 8fa4345
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
FROM quay.io/prometheus/busybox:latest
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
FROM golang:1.8
MAINTAINER Yaroslav Molochko <y.molochko@anchorfree.com>

COPY haproxy_exporter /bin/haproxy_exporter
COPY . /go/src/github.com/anchorfree/haproxy-exporter
RUN go get github.com/prometheus/log \
&& go get github.com/prometheus/client_golang/prometheus \
&& CGO_ENABLED=0 go build -a -tags netgo -o /build/haproxy_exporter github.com/anchorfree/haproxy-exporter

ENTRYPOINT ["/bin/haproxy_exporter"]
FROM alpine
MAINTAINER Yaroslav Molochko <[email protected]>

COPY --from=0 /build/haproxy_exporter /
EXPOSE 9101

ENTRYPOINT ["/haproxy_exporter"]
14 changes: 14 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!groovy​

pipeline {
agent { label 'ubuntu16'
}

stages {
stage('Build') {
steps {
dockerBuildTagPush()
}
}
}
}

0 comments on commit 8fa4345

Please sign in to comment.