forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (63 loc) · 2.54 KB
/
Copy pathDockerfile
File metadata and controls
72 lines (63 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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.
# This file creates a build environment for building and running kubernetes
# unit and integration tests
FROM gcr.io/k8s-testimages/kubekins-test:1.7-v20170713-c28e0556
MAINTAINER Erick Fejta <fejta@google.com>
# https://github.com/GoogleCloudPlatform/gsutil/issues/446 for python-openssl
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
zip \
unzip \
xz-utils \
zlib1g-dev \
python-openssl \
&& apt-get clean
ENV BAZEL_VERSION 0.5.4
RUN INSTALLER="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh"; \
wget -q "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${INSTALLER}" && \
chmod +x "${INSTALLER}" && "./${INSTALLER}" && rm "${INSTALLER}"
# Defaults of all e2e runs
ENV E2E_UP=true \
E2E_TEST=true \
E2E_DOWN=true
# Variable specific to the machine:
# GOOGLE_APPLICATION_CREDENTIALS
# JENKINS_GCE_SSH_PRIVATE_KEY_FILE
# JENKINS_GCE_SSH_PUBLIC_KEY_FILE
# JENKINS_AWS_SSH_PRIVATE_KEY_FILE
# JENKINS_AWS_SSH_PUBLIC_KEY_FILE
# JENKINS_AWS_CREDENTIALS_FILE
ADD ["https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz", \
"/workspace/"]
ENV PATH=/google-cloud-sdk/bin:/workspace:${PATH} \
CLOUDSDK_CORE_DISABLE_PROMPTS=1
RUN tar xzf /workspace/google-cloud-sdk.tar.gz -C / && \
/google-cloud-sdk/install.sh \
--disable-installation-options \
--bash-completion=false \
--path-update=false \
--usage-reporting=false && \
gcloud components install alpha beta kubectl && \
gcloud info | tee /workspace/gcloud-info.txt
# TODO(krzyzacy): Remove once https://github.com/kubernetes/kubernetes/issues/49673 is resolved
RUN gcloud components update --version=163.0.0
ADD ["e2e-runner.sh", \
"kops-e2e-runner.sh", \
"kubetest", \
"https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/get-kube.sh", \
"/workspace/"]
RUN ["chmod", "+x", "/workspace/get-kube.sh"]
WORKDIR "/workspace"
ENTRYPOINT ["/workspace/kubetest"]