Skip to content

Commit 9b9b0bf

Browse files
authored
Merge pull request #17 from adhocteam/nrh/bump-go-1.13.1
bump to go 1.13.1 tidy up the dockerfile
2 parents 6736f01 + 0fd14d0 commit 9b9b0bf

File tree

8 files changed

+88
-163
lines changed

8 files changed

+88
-163
lines changed

.circleci/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ version: 2
33

44
jobs:
55
test:
6-
-image: circleci/golang:1.13
7-
steps:
8-
- checkout
9-
- run: make test
6+
docker:
7+
- image: circleci/golang:1.13
8+
steps:
9+
- checkout
10+
- run: make test
1011

1112
workflows:
1213
version: 2
13-
build:
14+
doit:
1415
jobs:
15-
- build
16+
- test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.build
2+
script_exporter
3+
*.tar.gz

.promu.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
go:
2-
version: 1.12.6
2+
version: 1.13.1
33
cgo: true
44
repository:
55
path: github.com/adhocteam/script_exporter
66
build:
77
flags: -a -tags 'netgo static_build'
88
ldflags: |
9-
-linkmode external -extldflags -static
10-
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}}
11-
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}}
12-
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}}
13-
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
14-
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
9+
-X github.com/prometheus/common/version.Version={{.Version}}
10+
-X github.com/prometheus/common/version.Revision={{.Revision}}
11+
-X github.com/prometheus/common/version.Branch={{.Branch}}
12+
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
13+
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
1514
tarball:
1615
files:
1716
- LICENSE

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
FROM golang:1.12.6-alpine AS build-env
2-
MAINTAINER James Kassemi (Ad Hoc, LLC) <james.kassemi@adhocteam.us>
1+
FROM golang:1.13.1-alpine AS build-env
32

4-
RUN apk add --update git
5-
RUN apk add --update gcc
6-
RUN apk add --update libc-dev
3+
RUN apk add --update git gcc libc-dev
74
RUN go get -u github.com/prometheus/promu
85

96
RUN mkdir script_exporter
10-
COPY .promu.yml /go/script_exporter/
11-
COPY script_exporter.go /go/script_exporter/
12-
COPY go.mod /go/script_exporter/
13-
COPY go.sum /go/script_exporter/
7+
COPY .promu.yml script_exporter.go go.mod go.sum /go/script_exporter/
148

159
WORKDIR /go/script_exporter
1610
RUN promu build
1711

1812
FROM alpine:3.8
19-
COPY --from=build-env /go/script_exporter/script_exporter /bin/
13+
LABEL upstream="https://github.com/adhocteam/script_exporter"
14+
LABEL maintainer="james.kassemi@adhocteam.us"
15+
COPY --from=build-env /go/script_exporter/script_exporter /bin/script-exporter
2016
COPY script-exporter.yml /etc/script-exporter/config.yml
2117

2218
EXPOSE 9172

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14-
GO := GO111MODULE=on go
15-
PROMU := $(GOPATH)/bin/promu
14+
GO := GO111MODULE=on go
15+
GOPATH := $(shell go env GOPATH)
16+
PROMU := $(GOPATH)/bin/promu
1617

1718
PREFIX ?= $(shell pwd)
1819
BIN_DIR ?= $(shell pwd)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Prometheus exporter written to execute and collect metrics on script exit status
66
and duration. Designed to allow the execution of probes where support for the
77
probe type wasn't easily configured with the Prometheus blackbox exporter.
88

9-
Minimum supported Go Version: 1.7.3
9+
Minimum supported Go Version: 1.13.1
1010

1111
## Sample Configuration
1212

@@ -29,7 +29,7 @@ You can run via docker with:
2929
3030
```
3131
docker run -d -p 9172:9172 --name script-exporter \
32-
-v `pwd`/config.yml:/etc/script-exporter/config.yml:ro \
32+
-v `pwd`/script-exporter.yml:/etc/script-exporter/config.yml:ro \
3333
adhocteam/script-exporter:master \
3434
-config.file=/etc/script-exporter/config.yml \
3535
-web.listen-address=":9172" \

go.mod

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
module github.com/adhocteam/script_exporter
22

3-
go 1.12
3+
go 1.13
44

55
require (
6-
cloud.google.com/go v0.40.0 // indirect
7-
github.com/golang/mock v1.3.1 // indirect
8-
github.com/google/btree v1.0.0 // indirect
6+
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
97
github.com/google/go-github/v25 v25.1.3 // indirect
10-
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f // indirect
11-
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
128
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
13-
github.com/kr/pty v1.1.5 // indirect
14-
github.com/prometheus/client_golang v1.0.0
15-
github.com/prometheus/common v0.6.0
16-
github.com/prometheus/promu v0.4.0 // indirect
17-
github.com/sirupsen/logrus v1.4.2 // indirect
18-
github.com/stretchr/objx v0.2.0 // indirect
19-
go.opencensus.io v0.22.0 // indirect
20-
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443 // indirect
21-
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 // indirect
22-
golang.org/x/image v0.0.0-20190618124811-92942e4437e2 // indirect
23-
golang.org/x/mobile v0.0.0-20190607214518-6fa95d984e88 // indirect
24-
golang.org/x/mod v0.1.0 // indirect
25-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
26-
golang.org/x/sys v0.0.0-20190621134130-06bbe82148b1 // indirect
27-
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
28-
golang.org/x/tools v0.0.0-20190620191750-1fa568393b23 // indirect
29-
google.golang.org/appengine v1.6.1 // indirect
30-
google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601 // indirect
31-
google.golang.org/grpc v1.21.1 // indirect
32-
gopkg.in/yaml.v2 v2.2.2
33-
honnef.co/go/tools v0.0.0-20190614002413-cb51c254f01b // indirect
9+
github.com/prometheus/client_golang v1.1.0
10+
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
11+
github.com/prometheus/common v0.7.0
12+
github.com/prometheus/procfs v0.0.5 // indirect
13+
github.com/prometheus/promu v0.5.0 // indirect
14+
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb // indirect
15+
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
16+
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
17+
google.golang.org/appengine v1.6.5 // indirect
18+
gopkg.in/yaml.v2 v2.2.4
3419
)

0 commit comments

Comments
 (0)