mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-03-01 09:10:22 +00:00
Merge pull request #42 from euank/improve-makefile-somewhat
makefile: Make misc improvements
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/bin/node-problem-detector
|
||||
@@ -13,5 +13,5 @@ install:
|
||||
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/node-problem-detector
|
||||
- cd $HOME/gopath/src/k8s.io/node-problem-detector
|
||||
script:
|
||||
- go test -v -race ./pkg/...
|
||||
- make test
|
||||
- go build -race
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.1
|
||||
FROM alpine:3.4
|
||||
MAINTAINER Random Liu <lantaol@google.com>
|
||||
ADD node-problem-detector /node-problem-detector
|
||||
ADD ./bin/node-problem-detector /node-problem-detector
|
||||
ADD config /config
|
||||
ENTRYPOINT ["/node-problem-detector", "--kernel-monitor=/config/kernel-monitor.json"]
|
||||
|
||||
13
Makefile
13
Makefile
@@ -1,3 +1,5 @@
|
||||
.PHONY: all container push clean node-problem-detector
|
||||
|
||||
all: push
|
||||
|
||||
# See node-problem-detector.yaml for the version currently running-- bump this ahead before rebuilding!
|
||||
@@ -5,9 +7,16 @@ TAG = v0.2
|
||||
|
||||
PROJ = google_containers
|
||||
|
||||
node-problem-detector: node_problem_detector.go
|
||||
PKG_SOURCES := $(shell find pkg -name '*.go')
|
||||
|
||||
node-problem-detector: ./bin/node-problem-detector
|
||||
|
||||
./bin/node-problem-detector: $(PKG_SOURCES) node_problem_detector.go
|
||||
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' -o node-problem-detector
|
||||
|
||||
test:
|
||||
go test -timeout=1m -v -race ./pkg/...
|
||||
|
||||
container: node-problem-detector
|
||||
docker build -t gcr.io/$(PROJ)/node-problem-detector:$(TAG) .
|
||||
|
||||
@@ -15,4 +24,4 @@ push: container
|
||||
gcloud docker push gcr.io/$(PROJ)/node-problem-detector:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f node-problem-detector
|
||||
rm -f ./bin/node-problem-detector
|
||||
|
||||
0
bin/.gitkeep
Normal file
0
bin/.gitkeep
Normal file
Reference in New Issue
Block a user