Merge "Refactor!: JJB code comply with updates to v5.x"
authorKevin Sandi <ksandi@contractor.linuxfoundation.org>
Tue, 18 Apr 2023 14:09:10 +0000 (14:09 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 18 Apr 2023 14:09:10 +0000 (14:09 +0000)
jenkins-config/clouds/openstack/cattle/ubuntu2004-docker-8c-8g.cfg
jjb/doc/rules.yaml
packer/provision/local-docker.yaml

index c36ebcd..0a2e2e2 100644 (file)
@@ -1,3 +1,3 @@
-IMAGE_NAME=ZZCI - Ubuntu 20.04 - docker - x86_64 - 20220919-201946.022
+IMAGE_NAME=ZZCI - Ubuntu 20.04 - docker - x86_64 - 20230414-200946.220
 LABELS=ubuntu2004-docker-8c-8g
 HARDWARE_ID=v3-standard-8
index 7618f7d..9315bc8 100644 (file)
           exitstatus="0"
           warning="0"
           # message, begin
-          log_success_msg "Starting additional checks related to documentation."
-          log_success_msg "See https://git.onap.org/doc/doc-best-practice for example config files (master branch)."
-          log_success_msg "Modify example config files if you like to use them in a release branch."
-          log_success_msg "See https://wiki.onap.org/x/w4IEBw for the detailed procedure #02."
-          log_success_msg "In case of questions please contact the ONAP documentation team."
+          log_success_msg "INFO Starting additional checks related to documentation."
+          log_success_msg "INFO See https://git.onap.org/doc/doc-best-practice for example config files (master branch)."
+          log_success_msg "INFO Modify example config files if you like to use them in a release branch."
+          log_success_msg "INFO See https://wiki.onap.org/x/w4IEBw for the detailed procedure #02."
+          log_success_msg "INFO In case of questions please contact the ONAP documentation team."
           # docs directory
           if [ ! -d docs ] ; then
-            log_success_msg "Directory docs not found. Skipping further checks."
+            log_success_msg "INFO Directory docs not found. Skipping further checks."
             exit 0
           fi
           # config files, required
           for i in docs/index.rst docs/conf.py docs/requirements-docs.txt docs/_static/css/ribbon.css; do
             if [ ! -f $i ] ; then
-              log_failure_msg "$i missing. Please add it or remove the full docs directory."
+              log_failure_msg "FAIL $i missing. Please add it or remove the full docs directory."
               exitstatus="1"
             else
-              log_success_msg "$i found."
+              log_success_msg "INFO $i found."
             fi
           done
           # config files, no longer required
           for i in docs/conf.yaml; do
             if [ -f $i ] ; then
-              log_failure_msg "$i found. It is no longer required. Please remove it."
+              log_failure_msg "FAIL $i found. It is no longer required. Please remove it."
               exitstatus="1"
             else
-              log_success_msg "$i not found."
+              log_success_msg "INFO $i not found."
             fi
           done
           # tox.ini @ docs directory
           filename="docs/tox.ini"
           if [ ! -f $filename ] ; then
-            log_failure_msg "$filename missing. Please add it or remove the full docs directory."
+            log_failure_msg "FAIL $filename missing. Please add it or remove the full docs directory."
             exitstatus="1"
           else
-            log_success_msg "$filename found."
+            log_success_msg "INFO $filename found."
             # sphinx-build command and -W option
             sphinxbuild_detected=0
             linenumber=0
               if echo $line | grep -q '^[ \t]*sphinx-build.*' ; then
                 sphinxbuild_detected="1"
                 if echo $line | grep -q '^[ \t]*sphinx-build.* -W ' ; then
-                  log_success_msg "sphinx-build option '-W' used in $filename, line $linenumber."
+                  log_success_msg "INFO sphinx-build option '-W' used in $filename, line $linenumber."
                 elif echo $line | grep -q ' \-b spelling ' ; then
-                  log_warning_msg "sphinx-build option '-W' missing for spellcheck in $filename, line $linenumber."
+                  log_warning_msg "WARN sphinx-build option '-W' missing for spellcheck in $filename, line $linenumber."
                   warning="1"
                 else
-                  log_failure_msg "sphinx-build option '-W' missing in $filename, line $linenumber. Please add it."
+                  log_failure_msg "FAIL sphinx-build option '-W' missing in $filename, line $linenumber. Please add it."
                   exitstatus="1"
                 fi
               fi
             done < $filename
             if [ "$sphinxbuild_detected" = "0" ]; then
-              log_failure_msg "Sphinx-build command(s) missing in $filename. Please add it."
+              log_failure_msg "FAIL Sphinx-build command(s) missing in $filename. Please add it."
               exitstatus="1"
             fi
             # second tox.ini @ root directory
             if [ -f ./tox.ini ] ; then
               # sphinx-build command
               if cat ./tox.ini | grep -q '^[ \t]*sphinx-build.*' ; then
-                log_warning_msg "tox.ini also exists in root directory and contains sphinx-build command(s). Please check for redundancies."
+                log_warning_msg "WARN tox.ini also exists in root directory and contains sphinx-build command(s). Please check for redundancies."
                 warning="1"
               fi
             fi
           # ribbon.css
           filename="docs/_static/css/ribbon.css"
           if [ ! -f $filename ]; then
-            log_failure_msg "$filename missing. Please add it or remove the full docs directory."
+            log_failure_msg "FAIL $filename missing. Please add it or remove the full docs directory."
             exitstatus="1"
           else
-            log_success_msg "$filename found."
+            log_success_msg "INFO $filename found."
             # max-width parameter
             cssmaxwidth=$(grep '^[ \t]*max-width:' $filename | sed -e 's/^[ \t]*//' | sed -e 's/;$//');
             if [[ ! $cssmaxwidth == *"max-width: 800px"* ]]; then
-              log_failure_msg "Setting 'max-width: 800px' missing in $filename. Please add it."
+              log_failure_msg "FAIL Setting 'max-width: 800px' missing in $filename. Please add it."
               exitstatus="1"
             else
-              log_success_msg "Setting 'max-width: 800px' found in $filename."
+              log_success_msg "INFO Setting 'max-width: 800px' found in $filename."
             fi
             unset cssmaxwidth
           fi
           # message, end
           if [ "$exitstatus" = "0" ]; then
             if [ "$warning" = "0" ]; then
-              log_success_msg "Congratulations! No documentation problem(s) detected."
+              log_success_msg "INFO Congratulations! No documentation problem(s) detected."
             else
-              log_warning_msg "No major documentation problem(s) detected but there are warnings!"
+              log_warning_msg "WARN No major documentation problem(s) detected but there are warnings!"
             fi
           else
             if [ ! "$warning" = "0" ]; then
-              log_warning_msg "Please check the detected documentation warning(s)!"
+              log_warning_msg "WARN Please check the detected documentation warning(s)!"
             fi
-            log_failure_msg "Please fix the detected documentation problem(s)!"
+            log_failure_msg "FAIL Please fix the detected documentation problem(s)!"
           fi
           exit $exitstatus
 
index 8859961..3d78775 100644 (file)
@@ -10,7 +10,7 @@
     glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c
     glide_version: v0.13.1
     golang_version: 1.9.1
-    npm_version: "6.14.13"
+    npm_version: "9.6.4"
 
   tasks:
     - name: "Checking for x86_64"
       become: true
       when: ansible_distribution == 'Ubuntu'
 
-    - name: Install nodejs-dev libssl1.0-dev dep
-      apt:
-        name:
-          - libssl1.0-dev
-        update_cache: yes
-        state: fixed
-      become: true
-      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
-
-    - name: Install nodejs-dev dep for npm
-      apt:
-        name:
-          - nodejs-dev
-        update_cache: yes
-        state: fixed
-      become: true
-      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
-
     - name: Install supporting packages (Ubuntu 18.04)
       apt:
         name:
       become: true
       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
 
-    - name: Install npm and addon packages
-      apt:
-        name:
-          - nodejs
-          - npm
-          - node-gyp
-        update_cache: yes
-        state: fixed
-      become: true
-      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+    - name: Install nodejs
+      block:
+        - name: install nodejs prerequisites
+          apt:
+            name:
+              - apt-transport-https
+              - g++
+            update_cache: yes
+            state: present
+          become: true
+        - name: add nodejs apt key
+          apt_key:
+            url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
+            state: present
+          become: true
+        - name: add nodejs repository
+          apt_repository:
+            repo: deb https://deb.nodesource.com/node_19.x {{ ansible_distribution_release }} main
+            state: present
+            update_cache: yes
+          become: true
+        - name: install nodejs
+          apt:
+            name:
+              - nodejs
+            state: present
+          become: true
+      when: ansible_distribution == 'Ubuntu'
 
-    - name: Install nodejs and npm
+    - name: Check nodejs and npm versions
       block:
-        - name: 'Pull latest nodejs version'
-          command: 'curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && sudo apt-get install -y nodejs'
-          become: yes
         - name: 'Check nodejs version'
           command: node --version
         - name: 'Check npm version'
 
     - name: Download and install libssl Ubuntu 20.04
       apt:
-        deb: http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.10_amd64.deb
+        deb: http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.11_amd64.deb
       become: true
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'