Refactor: JJB code

- Fix shellcheck errors: SC1090, SC2164 and warnings
- Refactor yaml to standardize it across the repo with prettier
- Refactor with yamllint

Change-Id: Ie36c4a3af173fa3609cd4e904775be54b4a56990
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
diff --git a/jjb/pti-rtp/install-yocto-prereq-centos.sh b/jjb/pti-rtp/install-yocto-prereq-centos.sh
index dc2c796..ba3feb8 100644
--- a/jjb/pti-rtp/install-yocto-prereq-centos.sh
+++ b/jjb/pti-rtp/install-yocto-prereq-centos.sh
@@ -25,10 +25,10 @@
      diffutils diffstat cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
      perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-Digest-SHA \
      python3-pip xz which SDL-devel xterm"
-echo "INFO: installing epel-release and packages $pkgs"
+echo "INFO: installing epel-release and packages ${pkgs}"
 sudo yum install -y epel-release \
   && sudo yum makecache \
-  && sudo yum install -y $pkgs
+  && sudo yum install -y "${pkgs}"
 
 git config --global user.name "oran inf builder"
 git config --global user.email "oran.inf@windriver.com"
diff --git a/jjb/pti-rtp/pti-rtp.yaml b/jjb/pti-rtp/pti-rtp.yaml
index 689a16e..ed4f088 100644
--- a/jjb/pti-rtp/pti-rtp.yaml
+++ b/jjb/pti-rtp/pti-rtp.yaml
@@ -25,7 +25,7 @@
     # use a centos with big memory; docker not required
     build-node: centos7-docker-2c-8g
     # use a non-recursive pattern
-    archive-artifacts: '*.log'
+    archive-artifacts: "*.log"
 
 - project:
     <<: *pti_rtp_common
@@ -33,8 +33,8 @@
     # runs about 50~80 minutes
     build-timeout: 120
     script: !include-raw-escape:
-        - install-yocto-prereq-centos.sh
-        - verify-inf.sh
+      - install-yocto-prereq-centos.sh
+      - verify-inf.sh
     jobs:
       - oran-shell-verify
 
@@ -44,8 +44,8 @@
     # runs about 50~80 minutes
     build-timeout: 120
     script: !include-raw-escape:
-        - install-yocto-prereq-centos.sh
-        - verify-inf.sh
+      - install-yocto-prereq-centos.sh
+      - verify-inf.sh
     jobs:
       - oran-shell-merge
 
@@ -57,9 +57,9 @@
     # runs about 48 hours
     build-timeout: 2880
     script: !include-raw-escape:
-        - install-yocto-prereq-centos.sh
-        - build-inf.sh
-        - upload-inf.sh
+      - install-yocto-prereq-centos.sh
+      - build-inf.sh
+      - upload-inf.sh
     jobs:
       - oran-shell-release
     stream:
diff --git a/jjb/pti-rtp/upload-inf.sh b/jjb/pti-rtp/upload-inf.sh
index 4d99944..a472e49 100644
--- a/jjb/pti-rtp/upload-inf.sh
+++ b/jjb/pti-rtp/upload-inf.sh
@@ -22,13 +22,14 @@
 set -eu -o pipefail
 
 if [[ -f ~/lf-env.sh ]]; then
-    source ~/lf-env.sh
+    # shellcheck source=/dev/null
+    . ~/lf-env.sh
     lf-activate-venv --python python3 lftools
 else
     echo "INFO: creating virtual environment"
     virtualenv -p python3 /tmp/venv
     PATH=/tmp/venv/bin:$PATH
-    
+
     pip_pkgs="pip setuptools lftools"
     for pkg in $pip_pkgs; do
         cmd_pip="python -m pip install --upgrade $pkg"