Fix OS_CLOUD export for image validation
[releng/global-jjb.git] / jjb / lf-macros.yaml
index 15f008a..529254c 100644 (file)
@@ -76,6 +76,8 @@
           # Ensure python-tools are installed in case job template does not
           # call the lf-infra-pre-build macro.
           - ../shell/python-tools-install.sh
+      - shell: !include-raw:
+          - ../shell/sudo-logs.sh
       - shell: !include-raw:
           - ../shell/logs-deploy.sh
       - shell: !include-raw:
             PACKER_PLATFORM={platform}
             PACKER_TEMPLATE={template}
             PACKER_VERSION={packer-version}
+            UPDATE_CLOUD_IMAGE={update-cloud-image}
       - shell: !include-raw-escape:
           - ../shell/packer-install.sh
           - ../shell/packer-build.sh
       - shell: !include-raw:
           - ../shell/packer-clear-credentials.sh
 
+- builder:
+    name: lf-infra-update-packer-images
+    builders:
+      - shell: !include-raw: ../shell/update-cloud-images.sh
+
 - builder:
     name: lf-infra-push-gerrit-patch
     builders:
     name: lf-rtd-verify
     builders:
       - inject:
-          properties-content: DOC_DIR={doc-dir}
+          properties-content: |
+            DOC_DIR={doc-dir}
+            PYTHON={python-version}
       - shell: !include-raw-escape: ../shell/tox-install.sh
       - shell: !include-raw-escape: ../shell/rtd-verify.sh
 
+- builder:
+    name: lf-rtdv3-build
+
+    builders:
+      - conditional-step:
+          condition-kind: file-exists
+          condition-filename: .readthedocs.yaml
+          on-evaluation-failure: dont-run
+          steps:
+            - inject:
+                properties-content: |
+                  TOX_ENVS=docs,docs-linkcheck
+            - lf-infra-pre-build
+            - lf-infra-tox-install:
+                python-version: "python3"
+            - shell: !include-raw: ../shell/tox-run.sh
+            - shell: !include-raw: ../shell/rtdv3.sh
+
 - builder:
     name: check-info-votes
     builders:
           sonar-name: Sonar
           scanner-name: SonarQubeScanner
           task: "{sonar-task}"
-          project: "sonar-project.properties"
+          project: "{sonar-project-file}"
+          properties: "{sonar-properties}"
+          java-opts: "{sonar-java-opts}"
+          additional-arguments: "{sonar-additional-args}"
+
+- builder:
+    name: lf-infra-sonar-with-prescan
+    # Run a Sonar Jenkins Plugin
+    builders:
+      - lf-sonar-prescan # Must be defined by caller
+      - sonar:
+          sonar-name: Sonar
+          scanner-name: SonarQubeScanner
+          task: "{sonar-task}"
+          project: "{sonar-project-file}"
           properties: "{sonar-properties}"
           java-opts: "{sonar-java-opts}"
           additional-arguments: "{sonar-additional-args}"
           name: LOG_DIR
           default: ""
           description: "Log dir, example: project-maven-stage-master/17/"
-      - string:
+      - choice:
           name: DISTRIBUTION_TYPE
-          default: ""
-          description: "Set to maven for build with parametes"
+          choices:
+            - None
+            - container
+            - maven
+          description: "Set to maven for build with parameters"
       - bool:
           name: USE_RELEASE_FILE
           default: "{use-release-file}"