github.com/shashidharatd/test-infra@v0.0.0-20171006011030-71304e1ca560/jenkins/e2e-image/Dockerfile (about)

     1  # Copyright 2016 The Kubernetes Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  # This file creates a build environment for building and running kubernetes
    16  # unit and integration tests
    17  
    18  FROM gcr.io/k8s-testimages/kubekins-test:1.7-v20170713-c28e0556
    19  MAINTAINER  Erick Fejta <fejta@google.com>
    20  
    21  # https://github.com/GoogleCloudPlatform/gsutil/issues/446 for python-openssl
    22  RUN apt-get update && apt-get install -y --no-install-recommends \
    23      pkg-config \
    24      zip \
    25      unzip \
    26      xz-utils \
    27      zlib1g-dev \
    28      python-openssl \
    29      && apt-get clean
    30  
    31  ENV BAZEL_VERSION 0.5.4
    32  RUN INSTALLER="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh"; \
    33      wget -q "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${INSTALLER}" && \
    34      chmod +x "${INSTALLER}" && "./${INSTALLER}" && rm "${INSTALLER}"
    35  
    36  # Defaults of all e2e runs
    37  ENV E2E_UP=true \
    38      E2E_TEST=true \
    39      E2E_DOWN=true
    40  
    41  # Variable specific to the machine:
    42  # GOOGLE_APPLICATION_CREDENTIALS
    43  # JENKINS_GCE_SSH_PRIVATE_KEY_FILE
    44  # JENKINS_GCE_SSH_PUBLIC_KEY_FILE
    45  # JENKINS_AWS_SSH_PRIVATE_KEY_FILE
    46  # JENKINS_AWS_SSH_PUBLIC_KEY_FILE
    47  # JENKINS_AWS_CREDENTIALS_FILE
    48  
    49  ADD ["https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz", \
    50       "/workspace/"]
    51  ENV PATH=/google-cloud-sdk/bin:/workspace:${PATH} \
    52      CLOUDSDK_CORE_DISABLE_PROMPTS=1
    53  RUN tar xzf /workspace/google-cloud-sdk.tar.gz -C / && \
    54      /google-cloud-sdk/install.sh \
    55          --disable-installation-options \
    56          --bash-completion=false \
    57          --path-update=false \
    58          --usage-reporting=false && \
    59      gcloud components install alpha beta kubectl && \
    60      gcloud info | tee /workspace/gcloud-info.txt
    61  
    62  ADD ["e2e-runner.sh", \
    63      "kops-e2e-runner.sh", \
    64      "runner", \
    65      "kubetest", \
    66      "https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/get-kube.sh", \
    67      "/workspace/"]
    68  RUN ["chmod", "+x", "/workspace/get-kube.sh"]
    69  
    70  WORKDIR "/workspace"
    71  ENTRYPOINT ["/workspace/runner"]