Skip to content

Commit

Permalink
Fix spelling and boilerplate errors
Browse files Browse the repository at this point in the history
Some spelling and boilerplate errors are fixed which caused the failing
of these tests.
  • Loading branch information
sachinkumarsingh092 committed Jan 11, 2021
1 parent 71690af commit 69721b0
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 10 deletions.
16 changes: 16 additions & 0 deletions .prow.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
#! /bin/bash -e

# Copyright 2021 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.

# This is for testing csi-release-tools itself in Prow. All other
# repos use prow.sh for that, but as csi-release-tools isn't a normal
# repo with some Go code in it, it has a custom Prow test script.

./verify-shellcheck.sh "$(pwd)"
./verify-spelling.sh "$(pwd)"
./verify-boilerplate.sh "$(pwd)"
2 changes: 1 addition & 1 deletion SIDECAR_RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The release manager must:
kubernetes/org to request membership
* Be a top level approver for the repository. To become a top level approver,
the candidate must demonstrate ownership and deep knowledge of the repository
through active maintainence, responding to and fixing issues, reviewing PRs,
through active maintenance, responding to and fixing issues, reviewing PRs,
test triage.
* Be part of the maintainers or admin group for the repository. admin is a
superset of maintainers, only maintainers level is required for cutting a
Expand Down
14 changes: 14 additions & 0 deletions cloudbuild.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#! /bin/bash

# Copyright 2021 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.

# shellcheck disable=SC1091
. release-tools/prow.sh

Expand Down
8 changes: 4 additions & 4 deletions prow.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/bash
#

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -73,7 +73,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64
# which is disabled with GOFLAGS=-mod=vendor).
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"

# Go versions can be specified seperately for different tasks
# Go versions can be specified separately for different tasks
# If the pre-installed Go is missing or a different
# version, the required version here will get installed
# from https://golang.org/dl/.
Expand Down Expand Up @@ -293,7 +293,7 @@ configvar CSI_PROW_E2E_FOCUS_LATEST '\[Feature:VolumeSnapshotDataSource\]' "non-
configvar CSI_PROW_E2E_FOCUS "$(get_versioned_variable CSI_PROW_E2E_FOCUS "${csi_prow_kubernetes_version_suffix}")" "non-alpha, feature-tagged tests"

# Serial vs. parallel is always determined by these regular expressions.
# Individual regular expressions are seperated by spaces for readability
# Individual regular expressions are separated by spaces for readability
# and expected to not contain spaces. Use dots instead. The complete
# regex for Ginkgo will be created by joining the individual terms.
configvar CSI_PROW_E2E_SERIAL '\[Serial\] \[Disruptive\]' "tags for serial E2E tests"
Expand Down Expand Up @@ -998,7 +998,7 @@ make_test_to_junit () {
echo "$line" # pass through
if echo "$line" | grep -q "^### [^ ]*:$"; then
if [ "$testname" ]; then
# previous test succesful
# previous test successful
echo " </system-out>" >>"$out"
echo " </testcase>" >>"$out"
fi
Expand Down
10 changes: 7 additions & 3 deletions verify-boilerplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ if [[ -z "$(command -v python)" ]]; then
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
fi

REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")
# The csi-release-tools directory.
TOOLS="$(dirname "${BASH_SOURCE[0]}")"

boilerDir="${REPO_ROOT}/boilerplate"
# Directory to check. Default is the parent of the tools themselves.
ROOT="${1:-${TOOLS}/..}"

boilerDir="${ROOT}/boilerplate"
boiler="${boilerDir}/boilerplate.py"

files_need_boilerplate=("$("${boiler}" --rootdir="${REPO_ROOT}" --verbose)")
mapfile -t files_need_boilerplate < <("${boiler}" --rootdir="${ROOT}" --verbose)

# Run boilerplate.py unit tests
unitTestOut="$(mktemp)"
Expand Down
7 changes: 6 additions & 1 deletion verify-spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ set -o pipefail

TOOL_VERSION="v0.3.4"

# The csi-release-tools directory.
TOOLS="$(dirname "${BASH_SOURCE[0]}")"

# Directory to check. Default is the parent of the tools themselves.
ROOT="${1:-${TOOLS}/..}"

# cd to the root path
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
cd "${ROOT}"

# create a temporary directory
Expand Down
2 changes: 1 addition & 1 deletion verify-subtree.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/sh -e
#

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 69721b0

Please sign in to comment.