Merge "Chore: Fix bashate warnings"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 19 Aug 2022 17:13:56 +0000 (17:13 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Fri, 19 Aug 2022 17:13:56 +0000 (17:13 +0000)
.gitlint
jenkins-init-scripts/lf-env.sh
jjb/lf-ci-jobs.yaml
releasenotes/notes/fix-docs-lf-activate-env-a1e6fb274186f86d.yaml [new file with mode: 0644]
releasenotes/notes/safer-java-variable-handling-04c92b7148ac4cac.yaml [new file with mode: 0644]
releasenotes/notes/upgrade-packer-1.8.2-ff647084adf72c39.yaml [new file with mode: 0644]
shell/logs-deploy.sh
shell/maven-sonar.sh
shell/update-java-alternatives.sh

index db97d76..0f81b03 100644 (file)
--- a/.gitlint
+++ b/.gitlint
@@ -94,3 +94,7 @@ contrib=contrib-title-conventional-commits,contrib-body-requires-signed-off-by
 # to the following (fairly standard) topics and require them to be Mixed Case
 [contrib-title-conventional-commits]
 types=Fix,Feat,Chore,Docs,Style,Refactor,Perf,Test,Revert,CI,Build
+
+# Require RELENG issues in commit messages
+[body-match-regex]
+regex=(.*)Issue:\s+(?<!IT)RELENG-\d+(.*)
index d0ea625..a1bd350 100644 (file)
@@ -108,7 +108,7 @@ lf-boolean () {
 #   or
 #   lf-activate-venv lftools
 #   or
-#   lf-activate-venv --python 3.6 git-review
+#   lf-activate-venv --python python3.8 git-review
 #
 # DESCRIPTION
 #   This function will create a new Python Virtual Environment (venv) and
index abe3564..09a76a1 100644 (file)
@@ -30,7 +30,7 @@
     submodule-disable: false
     packer-builder: openstack
     packer-cloud-settings: packer-cloud-env
-    packer-version: 1.6.6
+    packer-version: 1.8.2
 
     #####################
     # Job Configuration #
diff --git a/releasenotes/notes/fix-docs-lf-activate-env-a1e6fb274186f86d.yaml b/releasenotes/notes/fix-docs-lf-activate-env-a1e6fb274186f86d.yaml
new file mode 100644 (file)
index 0000000..fcfac5d
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    Fix lf-activate-env code comment. The comment suggests using
+    just the version number ``--python <x.y>``, however as per the
+    code the correct format as per the code is ``--python python<x.y>``
diff --git a/releasenotes/notes/safer-java-variable-handling-04c92b7148ac4cac.yaml b/releasenotes/notes/safer-java-variable-handling-04c92b7148ac4cac.yaml
new file mode 100644 (file)
index 0000000..8a0fd0f
--- /dev/null
@@ -0,0 +1,8 @@
+---
+issues:
+  - |
+    Addresses problems found while troubleshooting IT-24352
+fixes:
+  - |
+    Added support for debian in update-java-alternatives.sh (addresses potential Ubuntu detection bug)
+    Safer handling of unset/null SONARCLOUD_JAVA_VERSION variable preventing java runtime issues
diff --git a/releasenotes/notes/upgrade-packer-1.8.2-ff647084adf72c39.yaml b/releasenotes/notes/upgrade-packer-1.8.2-ff647084adf72c39.yaml
new file mode 100644 (file)
index 0000000..658b71c
--- /dev/null
@@ -0,0 +1,7 @@
+---
+upgrade:
+  - |
+    Upgrade Packer version to v1.8.2. The version is more recent v1.8.2
+    and has security updates.
+
+    Ref: https://github.com/hashicorp/packer/releases/tag/v1.8.2
index 79f8db4..d797fa7 100644 (file)
@@ -12,7 +12,7 @@ echo "---> logs-deploy.sh"
 
 # shellcheck disable=SC1090
 source ~/lf-env.sh
-lf-activate-venv --python 3.8 lftools
+lf-activate-venv --python python3.8 lftools
 
 # Ensure we fail the job if any steps fail
 # Disable 'globbing'
index 9d13003..9c82633 100644 (file)
@@ -48,7 +48,7 @@ if [ "$SONAR_HOST_URL" = "https://sonarcloud.io" ]; then
     fi
 fi
 
-if [ "$SET_JDK_VERSION" != "$SONARCLOUD_JAVA_VERSION" ]; then
+if [ -n "$SONARCLOUD_JAVA_VERSION" ] && [ "$SET_JDK_VERSION" != "$SONARCLOUD_JAVA_VERSION" ]; then
     export SET_JDK_VERSION="$SONARCLOUD_JAVA_VERSION"
     bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
     source /tmp/java.env
index 0bed1ec..58a83fc 100644 (file)
@@ -52,8 +52,8 @@ case "${OS}" in
         echo "---> RedHat type system detected"
         update-java-redhat
     ;;
-    ubuntu)
-        echo "---> Ubuntu system detected"
+    ubuntu|debian)
+        echo "---> Ubuntu/Debian system detected"
         update-java-ubuntu
     ;;
 esac