...
1#!/usr/bin/env bash
2# Copyright 2017 The Kubernetes Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16set -o errexit
17set -o nounset
18set -o pipefail
19
20# Complete the release with the standard env
21KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
22
23# Check and error if not "in-a-container"
24if [[ ! -f /.dockerenv ]]; then
25 echo
26 echo "'make release-in-a-container' can only be used from a docker container."
27 echo
28 exit 1
29fi
30
31# Other dependencies: Your container should contain docker
32if ! type -p docker >/dev/null 2>&1; then
33 echo
34 echo "'make release-in-a-container' requires a container with" \
35 "docker installed."
36 echo
37 exit 1
38fi
39
40
41# First run make cross-in-a-container
42make cross-in-a-container
43
44# at the moment only make test is supported.
45if [[ $KUBE_RELEASE_RUN_TESTS =~ ^[yY]$ ]]; then
46 make test
47fi
48
49"${KUBE_ROOT}/build/package-tarballs.sh"
View as plain text