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

     1  #!/bin/bash
     2  # Copyright 2015 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  
    16  # Run e2e tests using environment variables exported in e2e.sh.
    17  
    18  set -o errexit
    19  set -o nounset
    20  set -o pipefail
    21  set -o xtrace
    22  
    23  export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
    24  
    25  echo 'WARNING: e2e-runner.sh is deprecated! This will error on August 2nd' >&2
    26  echo 'Call kubetest directly' >&2
    27  echo 'More info: https://github.com/kubernetes/test-infra/issues/2829' >&2
    28  
    29  if [[ "$(date +%s)" -gt "$(date --date='August 1 2017' +%s)" ]]; then
    30    echo 'e2e-runner.sh expired on August 1st, failing'
    31    exit 1
    32  elif [[ "$(date +%s)" -gt "$(date --date='July 25 2017' +%s)" ]]; then
    33    # Delay five minutes and spam the logs
    34    for i in {1..100}; do
    35      echo "e2e-runner.sh will expire in a week, please update job (notice ${i})" >&2
    36      sleep 3
    37    done
    38  fi
    39  
    40  kubetest "${@}"