Add option in Jenkins stage3 to test old SA
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index 31eab9d..bc08891 100644 (file)
@@ -32,6 +32,7 @@ properties([
         string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
         string(defaultValue: 'testing-daily', description: '', name: 'DOCKER_TAG'),
         string(defaultValue: 'ubuntu22.04', description: '', name: 'OPENSTACK_BASE_IMAGE'),
+        booleanParam(defaultValue: false, description: '', name: 'TRY_OLD_SERVICE_ASSURANCE'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_PASS'),
         booleanParam(defaultValue: true, description: '', name: 'SAVE_ARTIFACTS_ON_SMOKE_SUCCESS'),
@@ -565,6 +566,10 @@ node("${params.NODE}") {
                         osmHostname = "nbi.${IP_ADDRESS}.nip.io:443"
                     } else {
                         // Run -k8s installer here specifying internal docker registry and docker proxy
+                        osm_installation_options = ""
+                        if (params.TRY_OLD_SERVICE_ASSURANCE) {
+                            osm_installation_options = "--old-sa"
+                        }
                         withCredentials([gitlabCredentialsMap]) {
                             sshCommand remote: remote, command: """
                                 ./install_osm.sh -y \
@@ -573,7 +578,8 @@ node("${params.NODE}") {
                                     ${release} -r unstable \
                                     -d ${USERNAME}:${PASSWORD}@${INTERNAL_DOCKER_REGISTRY} \
                                     -p ${INTERNAL_DOCKER_PROXY} \
-                                    -t ${containerName}
+                                    -t ${containerName} \
+                                    ${osm_installation_options}
                             """
                         }
                         prometheusHostname = IP_ADDRESS