-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from funbox/develop
Version 0.6.0
- Loading branch information
Showing
22 changed files
with
2,996 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
sudo: false | ||
|
||
language: go | ||
|
||
go: | ||
- 1.6.x | ||
- 1.7.x | ||
- tip | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
os: | ||
- linux | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- go: tip | ||
|
||
before_install: | ||
- make deps | ||
|
||
script: | ||
- make test | ||
- make bin | ||
- ./init-exporter --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM centos:centos7 | ||
|
||
ENV GOPATH /root | ||
ENV TARGET /root/src/github.com/funbox/init-exporter | ||
|
||
RUN yum install -y http://release.yum.kaos.io/i386/kaos-repo-1.2.0-0.el6.noarch.rpm | ||
RUN yum clean all && yum -y update | ||
|
||
RUN yum -y install make go | ||
|
||
COPY . $TARGET | ||
RUN ls $TARGET -al | ||
RUN cd $TARGET && make all && make install | ||
|
||
RUN useradd service | ||
RUN mkdir -p /var/local/init-exporter/helpers && mkdir -p /var/log/init-exporter | ||
|
||
COPY ./testdata /root | ||
|
||
RUN yum clean all && rm -rf /tmp/* | ||
|
||
WORKDIR /root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM centos:centos6 | ||
|
||
ENV GOPATH /root | ||
ENV TARGET /root/src/github.com/funbox/init-exporter | ||
|
||
RUN yum install -y http://release.yum.kaos.io/i386/kaos-repo-1.2.0-0.el6.noarch.rpm | ||
RUN yum clean all && yum -y update | ||
|
||
RUN yum -y install go | ||
|
||
COPY . $TARGET | ||
RUN ls $TARGET -al | ||
RUN cd $TARGET && make all && make install | ||
|
||
RUN useradd service | ||
RUN mkdir -p /var/local/init-exporter/helpers && mkdir -p /var/log/init-exporter | ||
|
||
COPY ./testdata /root | ||
|
||
RUN yum clean all && rm -rf /tmp/* | ||
|
||
WORKDIR /root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2016 FB Group | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
######################################################################################## | ||
|
||
DESTDIR?= | ||
PREFIX?=/usr | ||
|
||
######################################################################################## | ||
|
||
.PHONY = all clean install uninstall deps deps-glide test | ||
|
||
######################################################################################## | ||
|
||
all: bin | ||
|
||
deps: | ||
go get -v pkg.re/check.v1 | ||
go get -v pkg.re/essentialkaos/ek.v6 | ||
go get -v pkg.re/essentialkaos/go-simpleyaml.v1 | ||
go get -v pkg.re/yaml.v2 | ||
|
||
deps-glide: | ||
glide install | ||
|
||
bin: | ||
go build init-exporter.go | ||
|
||
fmt: | ||
find . -name "*.go" -exec gofmt -s -w {} \; | ||
|
||
test: | ||
go test ./... -covermode=count | ||
|
||
install: | ||
mkdir -p $(DESTDIR)$(PREFIX)/bin | ||
cp init-exporter $(DESTDIR)$(PREFIX)/sbin/ | ||
cp common/init-exporter.conf $(DESTDIR)/etc/ | ||
|
||
uninstall: | ||
rm -f $(DESTDIR)$(PREFIX)/sbin/init-exporter | ||
rm -rf $(DESTDIR)/etc/init-exporter.conf | ||
|
||
clean: | ||
rm -f init-exporter | ||
|
||
upstart-playground: | ||
docker build -f ./Dockerfile.upstart -t upstart-playground . && docker run -ti --rm=true upstart-playground /bin/bash | ||
|
||
systemd-playground: | ||
docker build -f ./Dockerfile.systemd -t systemd-playground . && docker run -ti --rm=true systemd-playground /bin/bash |
Oops, something went wrong.