anchor.diff:  # See the License for the specific language governing permissions and
   # limitations under the License.
   
  -FROM gcr.io/k8s-testimages/kubekins-e2e:v20200827-e0bb92b-master
  -
  -# Install extras on top of base image
  +FROM gcr.io/k8s-testimages/kubekins-e2e:v20200827-e0bb92b-master AS stable-stuff
   
   ENV DEBIAN_FRONTEND noninteractive
  +# If we don't run update, the apt-get install below don't work
   RUN apt-get update
  -RUN gcloud components update
  +
  +# If you wanted to update gcloud without changing the kubekins-e2e image, uncomment this
  +# RUN gcloud components update
   
   # Docker
   RUN gcloud components install docker-credential-gcr
  
positive.code: RUN GO111MODULE=on go get -u sigs.k8s.io/kubetest2/kubetest2-kind
  RUN GO111MODULE=on go get -u sigs.k8s.io/kubetest2/kubetest2-tester-exec
  
  # protoc and required golang tooling
  ARG PROTOC_VERSION=3.12.3
  RUN wget "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" -O protoc.zip \
      && unzip -p protoc.zip bin/protoc > /usr/local/bin/protoc \
      && chmod +x /usr/local/bin/protoc \
      && rm protoc.zip
  RUN GO111MODULE=on go get github.com/gogo/protobuf/protoc-gen-gogofaster@v1.3.1
  
  # Extract versions
  RUN bazel version > /bazel_version
  RUN ko version > /ko_version
  
  # Note, it's pointless to run `source-gvm-and-run.sh use go1.13` in this Dockerfile because the PATH changes it makes won't stay in effect
  # We wrap the runner with our own which will run `gvm use $GO_VERSION` for us.
  RUN mv "$(which runner.sh)" "$(dirname "$(which runner.sh)")/kubekins-runner.sh"
  COPY images/prow-tests/runner.sh /usr/local/bin
  
  # TODO(chizhg): remove it once we replace with kntest in the places where this tool is used
  # Install our own tools
  RUN GO111MODULE=on go get knative.dev/pkg/testutils/junithelper@release-0.17
  
  COPY images/prow-tests/in-gvm-env.sh /usr/local/bin
  
  # Temporarily add test-infra to the image to build custom tools
  COPY . /go/src/knative.dev/test-infra
  
  # Build custom tools in the container
  
  # If you needed to compile and install different tools for different version of Go,
  #  you could do it like:
  #  RUN GO_VERSION=go1.13 in-gvm-env.sh go install knative.dev/test-infra/tools/coverage
  #  RUN GO_VERSION=go1.14 in-gvm-env.sh go install knative.dev/test-infra/tools/coverage
  
  # Install coverage tool:
  RUN go install knative.dev/test-infra/tools/coverage
  # This runs "runner.sh coverage" so coverage can be used with any installed Go
  
  # Install kntest
  RUN go install knative.dev/test-infra/kntest/cmd/kntest
  # Install perf-tests tool
  # TODO(chizhg): maybe also move perf-tests tool to be part of kntest?
  RUN go install knative.dev/test-infra/pkg/clustermanager/perf-tests
  
  # Cleanup
  RUN rm -fr /go/src/knative.dev/test-infra
  RUN rm -f /usr/local/bin/source-gvm-and-run.sh
  
negative.code: # Extra tools through apt-get
  RUN apt-get install -y uuid-runtime  # for uuidgen
  RUN apt-get install -y rubygems      # for mdl
  RUN apt-get install -y shellcheck    # for shellcheck presubmit
  
  # Extra tools through gem
  # TODO: this tool isn't used anymore, remove when release-0.22 is cut; and don't install rubygems above either
  RUN gem install mdl
  
  # Install go 1.12, 1.13, and 1.14 using https://github.com/moovweb/gvm
  # To use this, in Prow jobs set env var GO_VERSION="go1.14" (or go1.13, go1.12, etc)
  