diff --git a/build/debs/Dockerfile b/build/debs/Dockerfile index 031eab2cb7b..a2297fa93df 100644 --- a/build/debs/Dockerfile +++ b/build/debs/Dockerfile @@ -15,13 +15,13 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y \ && apt-get -yy -q install --no-install-recommends --no-install-suggests --fix-missing \ - dpkg-dev \ - build-essential \ - ca-certificates \ - curl \ - debhelper \ - dh-systemd \ - fakeroot \ + dpkg-dev \ + build-essential \ + ca-certificates \ + curl \ + debhelper \ + dh-systemd \ + fakeroot \ && apt-get upgrade -y \ && apt-get autoremove -y \ && apt-get clean \ diff --git a/go.mod b/go.mod index bd07120b39f..b5ca49824e3 100644 --- a/go.mod +++ b/go.mod @@ -14,5 +14,6 @@ require ( google.golang.org/appengine v1.5.0 // indirect google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 // indirect gopkg.in/src-d/go-git.v4 v4.13.1 + k8s.io/release/build/debs v0.0.0-20191011003919-ca0d58d1459d k8s.io/test-infra v0.0.0-20190829230513-7ef687d80d22 ) diff --git a/go.sum b/go.sum index 4d61f4da047..db32c10eef7 100644 --- a/go.sum +++ b/go.sum @@ -496,6 +496,8 @@ k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kubernetes v1.14.6/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/release/build/debs v0.0.0-20191011003919-ca0d58d1459d h1:K3CbJfm9d2H8q8u2jjOsveI2WFv4kF8jauDb+bc2mcY= +k8s.io/release/build/debs v0.0.0-20191011003919-ca0d58d1459d/go.mod h1:xcCkUxaNBXQollS2dQK+ComfQ1DMHnqkzw/+x8mF3c8= k8s.io/repo-infra v0.0.0-20190329054012-df02ded38f95 h1:PQyAIB6SRdV0a3Vj/VA39L1uANW36k/zg3tOk/Ffh3U= k8s.io/repo-infra v0.0.0-20190329054012-df02ded38f95/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= k8s.io/test-infra v0.0.0-20181019233642-2e10a0bbe9b3/go.mod h1:2NzXB13Ji0nqpyublHeiPC4FZwU0TknfvyaaNfl/BTA= diff --git a/hack/tools.go b/hack/tools.go new file mode 100644 index 00000000000..5a36a8b5226 --- /dev/null +++ b/hack/tools.go @@ -0,0 +1,24 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +package hack + +// Add tools that hack scripts depend on here, to ensure they are vendored. +import ( + _ "k8s.io/release/build/debs" +) diff --git a/images/k8s-cloud-builder/Dockerfile b/images/k8s-cloud-builder/Dockerfile index 1e82549fdd5..5931be229e3 100644 --- a/images/k8s-cloud-builder/Dockerfile +++ b/images/k8s-cloud-builder/Dockerfile @@ -6,10 +6,23 @@ FROM ubuntu:18.04 ARG DEBIAN_FRONTEND=noninteractive # Install packages -RUN apt-get -q update && apt-get install -qqy apt-transport-https \ - ca-certificates curl git gnupg2 lsb-release python \ - software-properties-common wget python-setuptools python-dev \ - build-essential jq pandoc gettext-base +RUN apt-get -q update \ + && apt-get install -qqy \ + apt-transport-https \ + build-essential \ + ca-certificates \ + curl \ + gettext-base \ + git \ + gnupg2 \ + jq \ + lsb-release \ + pandoc \ + python \ + python-dev \ + python-setuptools \ + software-properties-common \ + wget # Install Pip packages RUN python /usr/lib/python2.7/dist-packages/easy_install.py pip \ @@ -17,11 +30,16 @@ RUN python /usr/lib/python2.7/dist-packages/easy_install.py pip \ # Packages required by the make in k8s # localtime -RUN apt-get -q update && apt-get install -qqy tzdata +RUN apt-get -q update \ + && apt-get install -qqy tzdata # install net tools # required by common.sh -RUN apt-get -q update && apt-get install -qqy grep net-tools rsync +RUN apt-get -q update \ + && apt-get install -qqy \ + grep \ + net-tools \ + rsync # Install gcloud # common::set_cloud_binaries() looks for it in this path @@ -34,23 +52,24 @@ RUN curl -sSL https://sdk.cloud.google.com > /tmp/install.sh && \ #--------------------- # Based on instructions from: # https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#uninstall-old-versions -RUN \ - apt-get -y update && \ - apt-get install -y \ - linux-image-extra-virtual \ - apt-transport-https \ - ca-certificates \ - curl \ - software-properties-common && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ - add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable edge" && \ - apt-get -y update +RUN apt-get -y update \ + && apt-get install -y \ + linux-image-extra-virtual \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common \ + && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ + && add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable edge" \ + && apt-get -y update ARG DOCKER_VERSION=18.06.0~ce~3-0~ubuntu -RUN apt-get install -y docker-ce=${DOCKER_VERSION} unzip +RUN apt-get install -y \ + docker-ce=${DOCKER_VERSION} \ + unzip # Cleanup a bit RUN rm -rf /var/lib/apt/lists/* diff --git a/repos.bzl b/repos.bzl index 633c8a52d26..d83bc6f9795 100644 --- a/repos.bzl +++ b/repos.bzl @@ -2087,3 +2087,11 @@ def go_repositories(): sum = "h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo=", version = "v28.1.1", ) + go_repository( + name = "io_k8s_release_build_debs", + build_file_generation = "on", + build_file_proto_mode = "disable", + importpath = "k8s.io/release/build/debs", + sum = "h1:K3CbJfm9d2H8q8u2jjOsveI2WFv4kF8jauDb+bc2mcY=", + version = "v0.0.0-20191011003919-ca0d58d1459d", + )