mirror of
https://github.com/nshttpd/mikrotik-exporter.git
synced 2025-01-02 17:48:04 +01:00
CircleCI build to DockerHub too
Also as part of the CircleCI build create a container and push to docker hub.
This commit is contained in:
parent
8d1c2e7700
commit
83cbed45d8
@ -10,4 +10,6 @@ jobs:
|
|||||||
- /^nshttpd.*/
|
- /^nshttpd.*/
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: make deploy
|
- setup_remote_docker:
|
||||||
|
version: 18.05.0-ce
|
||||||
|
- run: make dockerhub
|
||||||
|
@ -3,7 +3,7 @@ FROM alpine:3.6
|
|||||||
EXPOSE 9436
|
EXPOSE 9436
|
||||||
|
|
||||||
COPY scripts/start.sh /app/
|
COPY scripts/start.sh /app/
|
||||||
COPY mikrotik-exporter /app/
|
COPY dist/mikrotik-exporter_linux_amd64 /app/
|
||||||
|
|
||||||
RUN chmod 755 /app/*
|
RUN chmod 755 /app/*
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ FROM arm32v7/busybox:1.27.2
|
|||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|
||||||
COPY scripts/start.sh /app/
|
COPY scripts/start.sh /app/
|
||||||
COPY mikrotik-exporter /app/
|
COPY dist/mikrotik-exporter_linux_arm /app/
|
||||||
|
|
||||||
RUN chmod 755 /app/*
|
RUN chmod 755 /app/*
|
||||||
|
|
||||||
|
9
Makefile
9
Makefile
@ -14,5 +14,10 @@ utils:
|
|||||||
go get github.com/tcnksm/ghr
|
go get github.com/tcnksm/ghr
|
||||||
|
|
||||||
deploy: utils
|
deploy: utils
|
||||||
gox -parallel=4 -ldflags "$(LDFLAGS)" -output "dist/mikrotik-exporter_{{.OS}}_{{.Arch}}"
|
gox -os="linux freebsd netbsd" -arch="amd64 arm arm64 386" -parallel=4 -ldflags "$(LDFLAGS)" -output "dist/mikrotik-exporter_{{.OS}}_{{.Arch}}"
|
||||||
ghr -t $(GITHUB_TOKEN) -u $(CIRCLE_PROJECT_USERNAME) -r $(CIRCLE_PROJECT_REPONAME) -replace $(VERSION) dist/
|
ghr -t $(GITHUB_TOKEN) -u $(CIRCLE_PROJECT_USERNAME) -r $(CIRCLE_PROJECT_REPONAME) -replace $(VERSION) dist/
|
||||||
|
|
||||||
|
dockerhub: deploy
|
||||||
|
@docker login -u $(DOCKER_USER) -p $(DOCKER_PASS)
|
||||||
|
docker build -t $(CIRCLE_PROJECT_USERNAME)/$(CIRCLE_PROJECT_REPONAME):$(VERSION) .
|
||||||
|
docker push $(CIRCLE_PROJECT_USERNAME)/$(CIRCLE_PROJECT_REPONAME):$(VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user