From 159abdde3f53095e6363f4cdebe863396d1f0d67 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Wed, 12 Oct 2016 21:05:04 -0700 Subject: [PATCH] release: docs and dockerfile --- Dockerfile => hack/release/Dockerfile | 6 ++-- hack/release/README.md | 43 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) rename Dockerfile => hack/release/Dockerfile (69%) create mode 100644 hack/release/README.md diff --git a/Dockerfile b/hack/release/Dockerfile similarity index 69% rename from Dockerfile rename to hack/release/Dockerfile index 338febf6..38df6efb 100644 --- a/Dockerfile +++ b/hack/release/Dockerfile @@ -2,11 +2,9 @@ FROM golang ADD . /go/src/github.com/coreos/kube-etcd-controller -RUN go get github.com/Masterminds/glide - RUN cd /go/src/github.com/coreos/kube-etcd-controller && \ - glide install && \ go build -o kube-etcd-controller ./cmd/controller/main.go && \ - mv kube-etcd-controller $GOPATH/bin/ + mv kube-etcd-controller /usr/local/bin && \ + rm -rf /go/* ENTRYPOINT ["kube-etcd-controller"] diff --git a/hack/release/README.md b/hack/release/README.md new file mode 100644 index 00000000..1c64246b --- /dev/null +++ b/hack/release/README.md @@ -0,0 +1,43 @@ +Release Workflow +====== + +This docs describes the release process of kube-etcd-controller public docker image. + +## Prerequisites + +Make sure following tools are installed: +- glide +- docker + +Make sure you have a quay.io account. + +## Build image + +Make sure your working directory is root of "kube-etcd-controller/". + +Install dependency if none exists: +``` +$ glide install +``` +You should see "vendor/". + +Build docker image +``` +$ docker build --tag quay.io/coreos/kube-etcd-controller:${TAG} -f hack/release/Dockerfile . +``` +`${TAG}` is the release tag. For example, "v0.0.1", "latest". +We also need to create a corresponding release on github with release note. + +## Push to quay.io + +Login to quay.io using docker if not done before: +``` +$ docker login quay.io +``` +Follow the prompts. + +Push docker image to quay.io: +``` +$ docker push quay.io/coreos/kube-etcd-controller:${TAG} +``` +`${TAG}` is the same as above.