Merge pull request #351 from jackgr/release-v1.2.1

Release v1.2.1
release-v1.2.1 v1.2.1
Jack Greenfield 9 years ago
commit ffd78f6e9b

@ -15,21 +15,23 @@
FROM golang:1.6
ENV GOLANG_CROSSPLATFORMS \
darwin/amd64 \
darwin/386 darwin/amd64 \
freebsd/386 freebsd/amd64 freebsd/arm \
linux/386 linux/amd64 linux/arm \
windows/386 windows/amd64
RUN mkdir -p "$GOPATH/src/github.com" && chmod -R 777 "$GOPATH/src/github.com"
RUN mkdir -p "$GOPATH"/src/github.com/kubernetes/deployment-manager/dm && chmod -R 777 "$GOPATH"
COPY . "$GOPATH"/src/dm
COPY . "$GOPATH"/src/github.com/kubernetes/deployment-manager
WORKDIR "$GOPATH"/src/dm
WORKDIR "$GOPATH"/src/github.com/kubernetes/deployment-manager/dm"
RUN go-wrapper download
RUN set -ex \
&& for platform in $GOLANG_CROSSPLATFORMS; do \
echo ${platform} ; \
GOOS=${platform%/*} \
GOARCH=${platform##*/} \
go build -v -o dm-${platform%/*}-${platform##*/}; \
go build -v -o dm-${platform%/*}-${platform##*/} ; \
echo ; \
done

@ -16,10 +16,16 @@ SHELL := /bin/bash
GOLANG_CROSSPLATFORMS := darwin/386 darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm windows/386 windows/amd64
ROOT_DIR := $(abspath ./..)
DIR := $(ROOT_DIR)
STORAGE_BUCKET=gs://get-dm
TAG=v1.2.1
all: build binary
build:
docker build -t dm .
docker build -t dm -f Dockerfile $(DIR)
binary:
- docker stop dm
@ -27,7 +33,19 @@ binary:
docker run --name dm dm
for platform in ${GOLANG_CROSSPLATFORMS}; do \
echo $$platform; \
docker cp dm:/go/src/dm/dm-$${platform%/*}-$${platform##*/} .; \
docker cp dm:/go/src/github.com/kubernetes/deployment-manager/dm/dm-$${platform%/*}-$${platform##*/} .; \
done
push:
for platform in ${GOLANG_CROSSPLATFORMS}; do \
echo $$platform; \
PLATFORM=$${platform%/*} && \
ARCH=$${platform##*/} && \
BINARY=dm-$${PLATFORM}-$${ARCH} && \
ZIP=dm-${TAG}-$${PLATFORM}-$${ARCH}.zip && \
zip -j $${ZIP} $${BINARY} ../install.yaml && \
gsutil cp $${ZIP} ${STORAGE_BUCKET} && \
rm $${ZIP} ; \
done
clean:

@ -31,7 +31,8 @@ else
endif
container:
docker build -t $(PREFIX)/$(IMAGE):$(TAG) -f Dockerfile $(DIR)
docker build -t $(PREFIX)/$(IMAGE):latest -f Dockerfile $(DIR)
docker tag -f $(PREFIX)/$(IMAGE):latest $(PREFIX)/$(IMAGE):$(TAG)
clean:
-docker rmi $(PREFIX)/$(IMAGE):$(TAG)

@ -15,13 +15,22 @@
set -euo pipefail
DEFAULT_TAG=v1.2
DEFAULT_BINARY=${GOPATH}/bin/dm
DEFAULT_TAG=v1.2.1
DEFAULT_PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
DEFAULT_ARCH=$(uname -m)
if [[ "${DEFAULT_ARCH}" == x86_64 ]]; then
DEFAULT_ARCH=amd64
fi
PLATFORM=${PLATFORM:-${DEFAULT_PLATFORM}}
ARCH=${ARCH:-${DEFAULT_ARCH}}
TAG=${TAG:-${DEFAULT_TAG}}
BINARY=dm-${PLATFORM}-${ARCH}
ZIP=dm-${TAG}-${PLATFORM}-${ARCH}.zip
STORAGE_URL=http://get-dm.storage.googleapis.com
ZIP=dm-${TAG:-DEFAULT_TAG}-${PLATFORM:-DEFAULT_PLATFORM}-${ARCH:-DEFAULT_ARCH}.zip
echo "Downloading ${ZIP}..."
curl -Ls "${STORAGE_URL}/${ZIP}" -O
@ -29,6 +38,7 @@ curl -Ls "${STORAGE_URL}/${ZIP}" -O
unzip -qo ${ZIP}
rm ${ZIP}
mv ${BINARY} dm
chmod +x dm
cat <<EOF

@ -1,43 +0,0 @@
#!/usr/bin/env bash
#
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Run this from deployment-manager root to build and push the dm client plus
# kubernetes install config into the publicly readable GCS bucket gs://get-dm.
#
# Must have EDIT permissions on the dm-k8s-prod GCP project.
set -euo pipefail
DEFAULT_TAG=v1.2
DEFAULT_BINARY=${GOPATH}/bin/dm
DEFAULT_PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
DEFAULT_ARCH=$(uname -m)
STORAGE_BUCKET=gs://get-dm
ZIP=dm-${TAG:-DEFAULT_TAG}-${PLATFORM:-DEFAULT_PLATFORM}-${ARCH:-DEFAULT_ARCH}.zip
echo "Building..."
make
echo "Zipping ${ZIP}..."
zip -j ${ZIP} ${BINARY:-DEFAULT_BINARY} install.yaml
echo "Uploading ${ZIP} to ${STORAGE_BUCKET}..."
gsutil cp ${ZIP} ${STORAGE_BUCKET}
rm ${ZIP}
echo "Done."

@ -5,7 +5,8 @@ info:
@echo "Project: ${PROJECT}"
@echo "Image: ${IMAGE}"
TAG ?= $(shell echo `date +"%s"`_`date +"%N"`)
DEFAULT_TAG := git-$(shell git rev-parse --short HEAD)
TAG ?= ${DEFAULT_TAG}
.PHONY: test-unit
test-unit:

@ -58,7 +58,7 @@ spec:
spec:
containers:
- env: []
image: gcr.io/dm-k8s-prod/expandybird:v1.2
image: gcr.io/dm-k8s-prod/expandybird:v1.2.1
name: expandybird
ports:
- containerPort: 8080
@ -102,7 +102,7 @@ spec:
spec:
containers:
- env: []
image: gcr.io/dm-k8s-prod/resourcifier:v1.2
image: gcr.io/dm-k8s-prod/resourcifier:v1.2.1
imagePullPolicy: Always
livenessProbe:
httpGet:
@ -153,7 +153,7 @@ spec:
spec:
containers:
- env: []
image: gcr.io/dm-k8s-prod/manager:v1.2
image: gcr.io/dm-k8s-prod/manager:v1.2.1
imagePullPolicy: Always
livenessProbe:
httpGet:

@ -31,7 +31,8 @@ else
endif
container:
docker build -t $(PREFIX)/$(IMAGE):$(TAG) -f Dockerfile $(DIR)
docker build -t $(PREFIX)/$(IMAGE):latest -f Dockerfile $(DIR)
docker tag -f $(PREFIX)/$(IMAGE):latest $(PREFIX)/$(IMAGE):$(TAG)
clean:
-docker rmi $(PREFIX)/$(IMAGE):$(TAG)

@ -33,7 +33,8 @@ else
endif
container:
docker build -t $(PREFIX)/$(IMAGE):$(TAG) -f Dockerfile $(DIR)
docker build -t $(PREFIX)/$(IMAGE):latest -f Dockerfile $(DIR)
docker tag -f $(PREFIX)/$(IMAGE):latest $(PREFIX)/$(IMAGE):$(TAG)
clean:
-docker rmi $(PREFIX)/$(IMAGE):$(TAG)

Loading…
Cancel
Save