Update jenkins stage3 to allow setting the VM flavor for OSM installation and tests
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index bc08891..c94b80a 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'),
+        string(defaultValue: 'osm.sanity', description: '', name: 'OPENSTACK_OSM_FLAVOR'),
         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'),
@@ -159,8 +160,7 @@ void archive_logs(Map remote) {
     sh 'rm -rf logs'
     sshCommand remote: remote, command: '''ls -al logs'''
     sshGet remote: remote, from: 'logs', into: '.', override: true
-    sh 'cp logs/*.log logs/dags/*.log .'
-    archiveArtifacts artifacts: '*.log'
+    archiveArtifacts artifacts: 'logs/*.log, logs/dags/*.log'
 }
 
 String get_value(String key, String output) {
@@ -401,7 +401,7 @@ node("${params.NODE}") {
                     println('Launching new VM')
                     output = sh(returnStdout: true, script: """#!/bin/sh -e
                         for line in `grep OS ~/hive/robot-systest.cfg | grep -v OS_CLOUD` ; do export \$line ; done
-                        openstack server create --flavor osm.sanity \
+                        openstack server create --flavor ${OPENSTACK_OSM_FLAVOR} \
                                                 --image ${OPENSTACK_BASE_IMAGE} \
                                                 --key-name CICD \
                                                 --property build_url="${BUILD_URL}" \