Add support for pre-commit hook/linting
.pre-commit-config.yaml
-----------------------
o Create initial config for pre-commit hook.
misc/*
o Basic inline cleanups courtesy of the pre-commit hook.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I6aa20216ade22b1a7406e8358864fb245842b713
diff --git a/jjb/pipeline/fossa-verify.groovy b/jjb/pipeline/fossa-verify.groovy
index da5c0e9..9974215 100644
--- a/jjb/pipeline/fossa-verify.groovy
+++ b/jjb/pipeline/fossa-verify.groovy
@@ -155,4 +155,3 @@
}
}
}
-
diff --git a/jjb/pipeline/voltha/bbsim-tests.groovy b/jjb/pipeline/voltha/bbsim-tests.groovy
index b0ba1a3..e71b94c 100644
--- a/jjb/pipeline/voltha/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/bbsim-tests.groovy
@@ -496,7 +496,7 @@
enter("exitStatus=${exitStatus}")
banner('collectArtifacts')
}
-
+
dotkube(['debug':false])
getPodsInfo("$WORKSPACE/${exitStatus}")
diff --git a/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
index 61c85b6..3aa50e8 100644
--- a/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
@@ -106,7 +106,7 @@
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
}
installVoltctl("${branch}")
-
+
sh(returnStdout: false, script: """
mkdir -p "$WORKSPACE/bin"
diff --git a/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
index 6cebea7..6f68e70 100644
--- a/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
@@ -112,7 +112,7 @@
{
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-TT.yaml"
}
-
+
installVoltctl("${branch}")
sh returnStdout: false, script: """
diff --git a/jjb/repos/voltha-helm-charts.yaml b/jjb/repos/voltha-helm-charts.yaml
index af82fc4..28ec08e 100644
--- a/jjb/repos/voltha-helm-charts.yaml
+++ b/jjb/repos/voltha-helm-charts.yaml
@@ -38,7 +38,7 @@
name: 'verify-voltha-helm-charts-jobs-master'
jobs:
- 'voltha-patch-test'
-
+
- job-group:
name: 'verify-voltha-helm-charts-jobs-voltha-2.12'
jobs:
@@ -58,5 +58,5 @@
# jobs:
# - 'voltha-patch-test':
# pipeline-script: 'voltha/voltha-2.8/bbsim-tests.groovy'
-
+
# [EOF]
diff --git a/jjb/shell/common/README.md b/jjb/shell/common/README.md
index 07d5e70..82fef33 100644
--- a/jjb/shell/common/README.md
+++ b/jjb/shell/common/README.md
@@ -30,5 +30,3 @@
source common/common.sh
source common/common.sh --tempdir
source common/common.sh --traputils --stacktrace
-
-
diff --git a/jjb/shell/common/common/sh/tempdir.sh b/jjb/shell/common/common/sh/tempdir.sh
index 40d842e..417cb6d 100644
--- a/jjb/shell/common/common/sh/tempdir.sh
+++ b/jjb/shell/common/common/sh/tempdir.sh
@@ -31,13 +31,13 @@
function common_tempdir_mkdir()
{
local var="$1"; shift
-
+
local pkgbase="${0##*/}" # basename
local pkgname="${pkgbase%.*}"
local __junk__
local __junk__="$(mktemp -d -t "${pkgname}.XXXXXXXXXX")"
-
+
__COMMON_TEMP_DIRS__+=("$__junk__")
export TMPDIR="$__junk__"
diff --git a/jjb/shell/common/common/sh/traputils.sh b/jjb/shell/common/common/sh/traputils.sh
index ded5cc7..cf51f8a 100644
--- a/jjb/shell/common/common/sh/traputils.sh
+++ b/jjb/shell/common/common/sh/traputils.sh
@@ -44,18 +44,18 @@
{
local new_trap="$1"; shift
declare -a sigs=($*)
-
+
# local sigs=$*
local sig
for sig in "${sigs[@]}";
do
local stack_name="$(trap_stack_name "$sig")"
local old_trap="$(get_trap "$sig")"
-
+
# eval '__trap_stack_SIGUSR1[${#__trap_stack_SIGUSR1[@]}]=$old_trap'
# __trap_stack_SIGUSR1[${#__trap_stack_SIGUSR1[@]}]=one
# trap two SIGUSR1
-
+
eval "${stack_name}"'[${#'"${stack_name}"'[@]}]=$old_trap'
trap "${new_trap}" "$sig"
done
diff --git a/jjb/shell/common/example.sh b/jjb/shell/common/example.sh
index 0c0e46a..ada12ae 100755
--- a/jjb/shell/common/example.sh
+++ b/jjb/shell/common/example.sh
@@ -54,7 +54,7 @@
# foo: hello - stack_frame[1]
# bar: hello - stack_frame[2]
# tans: early exit for stacktrace
-#
+#
# OFFENDER: ./example.sh:1
# ERROR: 'exit 1' exited with status 1
# Call tree:
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index fec3872..dddfe0c 100755
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -504,7 +504,7 @@
{
local -n ref=$1; shift
local varpath="$ref"
-
+
DEST_GOPATH=${DEST_GOPATH:-}
if [ -n "$DEST_GOPATH" ]; then
mkdir -p "$GOPATH/src/$DEST_GOPATH"
@@ -939,9 +939,9 @@
## -----------------------------------------------------------------------
function my_gh()
{
- func_echo "ENTER"
+ func_echo "ENTER"
set -x
-
+
declare -a cmd=()
cmd+=("$gh_cmd")
@@ -958,7 +958,7 @@
case "$arg" in
# Modes
- -*debug)
+ -*debug)
# shellcheck disable=SC2034
declare -i -g debug=1
;;
diff --git a/jjb/software-upgrades.yaml b/jjb/software-upgrades.yaml
index acb9e0b..4a83bcc 100644
--- a/jjb/software-upgrades.yaml
+++ b/jjb/software-upgrades.yaml
@@ -98,9 +98,9 @@
onu-image-crc: '0'
time-trigger: "H H/23 * * *"
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
# https://docs.voltha.org/master/release_notes/voltha_2.11.html#onos-apps
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
- 'software-upgrades-test-voltha-2.11':
name: 'periodic-software-upgrade-test-bbsim-2.11'
pipeline-script: 'voltha/voltha-2.11/software-upgrades.groovy'
diff --git a/jjb/verify/ofagent-go.yaml b/jjb/verify/ofagent-go.yaml
index 164b5de..7cb54e2 100644
--- a/jjb/verify/ofagent-go.yaml
+++ b/jjb/verify/ofagent-go.yaml
@@ -9,7 +9,7 @@
- 'verify-ofagent-go-jobs':
branch-regexp: '{all-branches-regexp}'
- 'verify-ofagent-jobs-master':
- branch-regexp: '^master$'
+ branch-regexp: '^master$'
- 'verify-ofagent-jobs-voltha-2.12':
name-extension: '-voltha-2.12'
override-branch: 'voltha-2.12'
diff --git a/jjb/verify/voltha-go.yaml b/jjb/verify/voltha-go.yaml
index 58fbafa..fbf92db 100644
--- a/jjb/verify/voltha-go.yaml
+++ b/jjb/verify/voltha-go.yaml
@@ -9,7 +9,7 @@
- 'verify-voltha-go-jobs':
branch-regexp: '{all-branches-regexp}'
- 'verify-voltha-go-jobs-master':
- branch-regexp: '^master$'
+ branch-regexp: '^master$'
- 'verify-voltha-go-jobs-voltha-2.12':
name-extension: '-voltha-2.12'
override-branch: 'voltha-2.12'
diff --git a/jjb/verify/voltha-openolt-adapter.yaml b/jjb/verify/voltha-openolt-adapter.yaml
index 6cee045..53b9990 100644
--- a/jjb/verify/voltha-openolt-adapter.yaml
+++ b/jjb/verify/voltha-openolt-adapter.yaml
@@ -47,7 +47,7 @@
jobs:
- 'voltha-patch-test':
extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
-
+
- job-group:
name: 'verify-voltha-openolt-adapter-jobs-voltha-2.12'
jobs:
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 7a1a99d..9938f5c 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -1751,8 +1751,8 @@
olts: 2
timeout: 180
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-test-DMI'
extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
@@ -1803,8 +1803,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-etcd-test'
build-node: 'ubuntu18.04-basebuild-4c-8g'
@@ -1862,8 +1862,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-unitag-subscriber-tt-test-bbsim'
code-branch: 'master'
@@ -1942,8 +1942,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-tt-maclearner-sanity-test-bbsim'
code-branch: 'master'
diff --git a/jjb/voltha-e2e/README b/jjb/voltha-e2e/README
index 8b57f6f..87d01b2 100644
--- a/jjb/voltha-e2e/README
+++ b/jjb/voltha-e2e/README
@@ -4,4 +4,4 @@
git branches are not used, all jobs are visible.
To support modular branch based testing naming conventions that include
some form of voltha-X.YY will be used within configs and templates to
-support separation of jobs by release branch.
\ No newline at end of file
+support separation of jobs by release branch.
diff --git a/jjb/voltha-e2e/master.yaml b/jjb/voltha-e2e/master.yaml
index d29f779..b21e70f 100644
--- a/jjb/voltha-e2e/master.yaml
+++ b/jjb/voltha-e2e/master.yaml
@@ -83,7 +83,7 @@
# ---------------------------------------------------------
# 20230828 - strange, release branches have pipeline-script
# 20230828 - while master branch did not (?) Script does
- # 20230828 - show in the jenkins UI but w/o updates.
+ # 20230828 - show in the jenkins UI but w/o updates.
# ---------------------------------------------------------
pipeline-script: 'voltha/bbsim-tests.groovy'
pipeline-branch: 'master'
diff --git a/jjb/voltha-e2e/voltha-2.12.yaml b/jjb/voltha-e2e/voltha-2.12.yaml
index 28e1771..2e9899d 100644
--- a/jjb/voltha-e2e/voltha-2.12.yaml
+++ b/jjb/voltha-e2e/voltha-2.12.yaml
@@ -194,5 +194,5 @@
flags: ""
teardown: true
logging: true
-
+
# [EOF]
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 5abab1b..89d1a4b 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -683,7 +683,7 @@
Post Tests on {config-pod} triggered by build_{config-pod}_{branch}, using {pipeline-script}<br /><br />
Created from job-template {id} from ci-management/jjb/voltha-test/voltha-nightly-jobs.yaml <br />
Created by (Suchitra Vemuri) <br />
- UUID: 798f0064-4058-11ee-b70f-2fee4c7dfce6 <br />
+ UUID: 798f0064-4058-11ee-b70f-2fee4c7dfce6 <br />
Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
<<: *voltha-pipe-job-boiler-plate
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 93cb11a..62b0dfa 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -276,7 +276,7 @@
time: '13'
pipeline-script: 'voltha/voltha-2.12/physical-build.groovy'
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
# Berlin POD test job - 2.11 versions: uses 1T4GEM tech profile on voltha branch
- 'build_voltha_pod_test':
timeout: 330