Unverified Commit b62dfb98 authored by Adam Reese's avatar Adam Reese
Browse files

remove tiller build infra

Showing with 2 additions and 103 deletions
+2 -103
DOCKER_REGISTRY ?= gcr.io
IMAGE_PREFIX ?= kubernetes-helm
SHORT_NAME ?= tiller
TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64 TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64
DIST_DIRS = find * -type d -exec DIST_DIRS = find * -type d -exec
APP = helm APP = helm
...@@ -14,7 +11,7 @@ TESTFLAGS := ...@@ -14,7 +11,7 @@ TESTFLAGS :=
LDFLAGS := -w -s LDFLAGS := -w -s
GOFLAGS := GOFLAGS :=
BINDIR := $(CURDIR)/bin BINDIR := $(CURDIR)/bin
BINARIES := helm tiller BINARIES := helm
# Required for globs to work correctly # Required for globs to work correctly
SHELL=/bin/bash SHELL=/bin/bash
...@@ -48,24 +45,6 @@ checksum: ...@@ -48,24 +45,6 @@ checksum:
shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \ shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \
done done
.PHONY: check-docker
check-docker:
@if [ -z $$(which docker) ]; then \
echo "Missing \`docker\` client which is required for development"; \
exit 2; \
fi
.PHONY: docker-binary
docker-binary: BINDIR = ./rootfs
docker-binary: GOFLAGS += -a -installsuffix cgo
docker-binary:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/tiller $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller
.PHONY: docker-build
docker-build: check-docker docker-binary
docker build --rm -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}
.PHONY: test .PHONY: test
test: build test: build
test: TESTFLAGS += -race -v test: TESTFLAGS += -race -v
...@@ -97,7 +76,7 @@ verify-docs: build ...@@ -97,7 +76,7 @@ verify-docs: build
.PHONY: clean .PHONY: clean
clean: clean:
@rm -rf $(BINDIR) ./rootfs/tiller ./_dist @rm -rf $(BINDIR) ./_dist
.PHONY: coverage .PHONY: coverage
coverage: coverage:
......
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.3
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
ENV HOME /tmp
COPY tiller /tiller
EXPOSE 44134
CMD ["/tiller"]
# RootFS
This directory stores all files that should be copied to the rootfs of a
Docker container. The files should be stored according to the correct
directory structure of the destination container. For example:
```
rootfs/bin -> /bin
rootfs/usr/local/share -> /usr/local/share
```
## Dockerfile
A Dockerfile in the rootfs is used to build the image. Where possible,
compilation should not be done in this Dockerfile, since we are
interested in deploying the smallest possible images.
Example:
```Dockerfile
FROM alpine:3.2
COPY . /
ENTRYPOINT ["/usr/local/bin/boot"]
```
MUTABLE_VERSION := canary
GIT_COMMIT = $(shell git rev-parse HEAD) GIT_COMMIT = $(shell git rev-parse HEAD)
GIT_SHA = $(shell git rev-parse --short HEAD) GIT_SHA = $(shell git rev-parse --short HEAD)
GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null) GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean") GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
ifdef VERSION ifdef VERSION
DOCKER_VERSION = $(VERSION)
BINARY_VERSION = $(VERSION) BINARY_VERSION = $(VERSION)
endif endif
DOCKER_VERSION ?= git-${GIT_SHA}
BINARY_VERSION ?= ${GIT_TAG} BINARY_VERSION ?= ${GIT_TAG}
# Only set Version if building a tag or VERSION is set # Only set Version if building a tag or VERSION is set
...@@ -25,31 +21,8 @@ endif ...@@ -25,31 +21,8 @@ endif
LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT} LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT}
LDFLAGS += -X k8s.io/helm/pkg/version.GitTreeState=${GIT_DIRTY} LDFLAGS += -X k8s.io/helm/pkg/version.GitTreeState=${GIT_DIRTY}
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${DOCKER_VERSION}
MUTABLE_IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
DOCKER_PUSH = docker push
ifeq ($(DOCKER_REGISTRY),gcr.io)
DOCKER_PUSH = gcloud docker push
endif
info: info:
@echo "Version: ${VERSION}" @echo "Version: ${VERSION}"
@echo "Git Tag: ${GIT_TAG}" @echo "Git Tag: ${GIT_TAG}"
@echo "Git Commit: ${GIT_COMMIT}" @echo "Git Commit: ${GIT_COMMIT}"
@echo "Git Tree State: ${GIT_DIRTY}" @echo "Git Tree State: ${GIT_DIRTY}"
@echo "Docker Version: ${DOCKER_VERSION}"
@echo "Registry: ${DOCKER_REGISTRY}"
@echo "Immutable Image: ${IMAGE}"
@echo "Mutable Image: ${MUTABLE_IMAGE}"
.PHONY: docker-push
docker-push: docker-mutable-push docker-immutable-push
.PHONY: docker-immutable-push
docker-immutable-push:
${DOCKER_PUSH} ${IMAGE}
.PHONY: docker-mutable-push
docker-mutable-push:
${DOCKER_PUSH} ${MUTABLE_IMAGE}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment