Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-12722

OSSMC tests not executed in upstream-istio-pipeline build when build is skipped

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Kiali
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Summary

      In Jenkins build kiali/main-pipelines/upstream-istio-pipeline #3463, the stage "Run OSSMC Tests" was skipped. Other test stages (Run integration Tests, Run Cypress UI Tests, Run Performance Tests) and the build stages (Build Kiali, Build OSSMC, Build Kiali Operator) were also skipped in this run.

      Root cause

      The "Run OSSMC Tests" stage is guarded by a when conditional that requires both of the following:

      1. ossmc_built_successfully == true — The OSSMC image must have been built successfully in the same pipeline run.
      2. RUN_OSSMC_TESTS == 'true' — The pipeline parameter RUN_OSSMC_TESTS must be set so that the expression evaluates to the string 'true'.

      In build #3463:

      • The stage "Build OSSMC" was skipped due to its when conditional (BUILD_OSSMC was not 'true' for this run).
      • Because "Build OSSMC" did not run, the variable ossmc_built_successfully remained false (its default).
      • The "Run OSSMC Tests" stage therefore did not run, since the first condition (ossmc_built_successfully == true) was not satisfied.

      Evidence from build log

      Stage "Build OSSMC" skipped due to when conditional
      ...
      Stage "Run OSSMC Tests" skipped due to when conditional
      

      Relevant pipeline logic

      • Build stage: "Build OSSMC" runs only when environment name: 'BUILD_OSSMC', value: 'true'.
      • Test stage: "Run OSSMC Tests" runs only when {{allOf { ossmc_built_successfully == true AND RUN_OSSMC_TESTS == 'true' }

        }}.

      • ossmc_built_successfully is set to true only inside the "Build OSSMC" stage when the OSSMC build job completes successfully.

      How to get OSSMC tests to run

      • When triggering the upstream-istio-pipeline job, ensure the parameter BUILD_OSSMC is enabled (so that the "Build OSSMC" stage runs and can set ossmc_built_successfully to true).
      • Ensure RUN_OSSMC_TESTS is enabled if OSSMC tests are desired.
      • Parameters are defined in jobs/kiali/main-pipelines/upstream-istio-pipeline.groovy (BUILD_OSSMC and RUN_OSSMC_TESTS).
      •  

              Unassigned Unassigned
              rhn-support-pmarek Pavel Marek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: