Remove unused variables and verbose e2e logs

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-06-27 11:57:00 -04:00
parent 47b5e20a88
commit 10dcf0db15
35 changed files with 331 additions and 427 deletions

View file

@ -1,45 +0,0 @@
#!/bin/bash
# Copyright 2020 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.
if [ -n "$DEBUG" ]; then
set -x
fi
set -o errexit
set -o nounset
set -o pipefail
MINIMUM_GO_VERSION=go1.13
if [[ -z "$(command -v go)" ]]; then
echo "
Can't find 'go' in PATH, please fix and retry.
See http://golang.org/doc/install for installation instructions.
"
exit 1
fi
IFS=" " read -ra go_version <<< "$(go version)"
if [[ "${MINIMUM_GO_VERSION}" != $(echo -e "${MINIMUM_GO_VERSION}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
echo "
Detected go version: ${go_version[*]}.
ingress-nginx requires ${MINIMUM_GO_VERSION} or greater.
Please install ${MINIMUM_GO_VERSION} or later.
"
exit 1
fi

View file

@ -16,15 +16,14 @@
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_VERSION=$(grep 'k8s.io/code-generator' go.sum | awk '{print $2}' | sed 's/\/go.mod//g' | head -1)
CODEGEN_PKG=$(echo `go env GOPATH`"/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}")
if [[ ! -d ${CODEGEN_PKG} ]]; then
echo "${CODEGEN_PKG} is missing. Running 'go mod download'."
go mod download
echo "${CODEGEN_PKG} is missing. Running 'go mod download'."
go mod download
fi
# Ensure we can execute.
@ -42,4 +41,4 @@ ${CODEGEN_PKG}/generate-groups.sh "deepcopy" \
k8s.io/ingress-nginx/internal k8s.io/ingress-nginx/internal \
.:ingress \
--output-base "$(dirname ${BASH_SOURCE})/../../.." \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt

View file

@ -51,7 +51,7 @@ if $SILENT ; then
echo "Running in the silent mode, run with -v if you want to see script logs."
fi
EXCLUDE="verify-all.sh verify-codegen.sh"
EXCLUDE="verify-all.sh"
ret=0
for t in `ls $KUBE_ROOT/hack/verify-*.sh`

View file

@ -19,14 +19,12 @@ set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
SCRIPT_BASE=${SCRIPT_ROOT}/../..
DIFFROOT="${SCRIPT_ROOT}/internal"
TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/internal"
_tmp="${SCRIPT_ROOT}/_tmp"
TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp"
cleanup() {
rm -rf "${_tmp}"
rm -rf "${TMP_DIFFROOT}"
}
trap "cleanup" EXIT SIGINT
@ -38,10 +36,10 @@ cp -a "${DIFFROOT}"/* "${TMP_DIFFROOT}"
"${SCRIPT_ROOT}/hack/update-codegen.sh"
echo "diffing ${DIFFROOT} against freshly generated codegen"
ret=0
diff -Naupr "${DIFFROOT}" "${TMP_DIFFROOT}" || ret=$?
diff -Naupr --no-dereference "${DIFFROOT}" "${TMP_DIFFROOT}" || ret=1
cp -a "${TMP_DIFFROOT}"/* "${DIFFROOT}"
if [[ $ret -eq 0 ]]
then
if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"