diff --git a/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-sles16-bundle b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-sles16-bundle new file mode 100644 index 000000000..e72678d81 --- /dev/null +++ b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-sles16-bundle @@ -0,0 +1,48 @@ +#!/usr/bin/env groovy + +node('salt-shaker-tests') { + properties([ + buildDiscarder(logRotator(numToKeepStr: '20', daysToKeepStr: '4', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + pipelineTriggers([ + URLTrigger( + cronTabSpec: '* * * * *', + triggerLabel: "salt-shaker-tests", + labelRestriction: true, + entries: [URLTriggerEntry( + url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/next:/testsuite/SLFO/repodata/repomd.xml', + contentTypes: [MD5Sum()] + )] + ), + cron('H 0 * * *')], + ), + parameters([ + choice(name: 'salt_flavor', choices: ['bundle'], description: 'Run testsuite for classic Salt or Salt Bundle'), + booleanParam(name: 'run_unit_tests', defaultValue: true, description: 'Run the Salt unit tests'), + booleanParam(name: 'run_integration_tests', defaultValue: true, description: 'Run the Salt integration tests'), + booleanParam(name: 'run_functional_tests', defaultValue: true, description: 'Run the Salt functional tests'), + string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), + string(name: 'skip_list_url', defaultValue: 'https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml', description: 'URL to the skiplist.toml file to run Salt shaker'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES16-Bundle.tf', description: 'Path to the tf file to be used'), + string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), + string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), + choice(name: 'sumaform_backend', choices: ['libvirt', 'aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), + choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), + choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + booleanParam(name: 'terraform_init', defaultValue: true, description: 'Call terraform init (needed if modules are added or changes)'), + booleanParam(name: 'terraform_taint', defaultValue: true, description: 'Call terraform taint (so the resources, except volumes, are recreated)'), + booleanParam(name: 'use_previous_terraform_state', defaultValue: false, description: 'Use previous Terraform state'), + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + timeout(activity: false, time: 3, unit: 'HOURS') { + def pipeline = load "jenkins_pipelines/environments/common/pipeline-salt-shaker.groovy" + pipeline.run(params) + } +} diff --git a/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-slmicro62-bundle b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-slmicro62-bundle new file mode 100644 index 000000000..5012adc3c --- /dev/null +++ b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-next-slmicro62-bundle @@ -0,0 +1,50 @@ +#!/usr/bin/env groovy + +node('salt-shaker-tests') { + properties([ + buildDiscarder(logRotator(numToKeepStr: '20', daysToKeepStr: '4', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + pipelineTriggers([ + URLTrigger( + cronTabSpec: '* * * * *', + triggerLabel: "salt-shaker-tests", + labelRestriction: true, + entries: [URLTriggerEntry( + url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/next:/testsuite/SLFO/repodata/repomd.xml', + contentTypes: [MD5Sum()] + )] + ), + cron('H 0 * * *')], + ), + parameters([ + choice(name: 'salt_flavor', choices: ['bundle'], description: 'Run testsuite for classic Salt or Salt Bundle'), + booleanParam(name: 'run_unit_tests', defaultValue: true, description: 'Run the Salt unit tests'), + booleanParam(name: 'run_integration_tests', defaultValue: true, description: 'Run the Salt integration tests'), + booleanParam(name: 'run_functional_tests', defaultValue: true, description: 'Run the Salt functional tests'), + string(name: 'testsuite_dir', defaultValue: '/opt/salt-testsuite-bundle/', description: 'Optional: Run testsuite from this directory'), + string(name: 'wait_after_deploy', defaultValue: '120', description: 'Optional: Seconds to wait after deployment is done (usually to allow transactional systems to reboot)'), + string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), + string(name: 'skip_list_url', defaultValue: 'https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml', description: 'URL to the skiplist.toml file to run Salt shaker'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro62-Bundle.tf', description: 'Path to the tf file to be used'), + string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), + string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), + choice(name: 'sumaform_backend', choices: ['libvirt', 'aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), + choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), + choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + booleanParam(name: 'terraform_init', defaultValue: true, description: 'Call terraform init (needed if modules are added or changes)'), + booleanParam(name: 'terraform_taint', defaultValue: true, description: 'Call terraform taint (so the resources, except volumes, are recreated)'), + booleanParam(name: 'use_previous_terraform_state', defaultValue: false, description: 'Use previous Terraform state'), + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + timeout(activity: false, time: 3, unit: 'HOURS') { + def pipeline = load "jenkins_pipelines/environments/common/pipeline-salt-shaker.groovy" + pipeline.run(params) + } +} diff --git a/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-sles16-bundle b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-sles16-bundle new file mode 100644 index 000000000..954cf15c2 --- /dev/null +++ b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-sles16-bundle @@ -0,0 +1,48 @@ +#!/usr/bin/env groovy + +node('salt-shaker-tests') { + properties([ + buildDiscarder(logRotator(numToKeepStr: '20', daysToKeepStr: '4', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + pipelineTriggers([ + URLTrigger( + cronTabSpec: '* * * * *', + triggerLabel: "salt-shaker-tests", + labelRestriction: true, + entries: [URLTriggerEntry( + url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/testing:/testsuite/SLFO/repodata/repomd.xml', + contentTypes: [MD5Sum()] + )] + ), + cron('H 0 * * *')], + ), + parameters([ + choice(name: 'salt_flavor', choices: ['bundle'], description: 'Run testsuite for classic Salt or Salt Bundle'), + booleanParam(name: 'run_unit_tests', defaultValue: true, description: 'Run the Salt unit tests'), + booleanParam(name: 'run_integration_tests', defaultValue: true, description: 'Run the Salt integration tests'), + booleanParam(name: 'run_functional_tests', defaultValue: true, description: 'Run the Salt functional tests'), + string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), + string(name: 'skip_list_url', defaultValue: 'https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml', description: 'URL to the skiplist.toml file to run Salt shaker'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES16-Bundle.tf', description: 'Path to the tf file to be used'), + string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), + string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), + choice(name: 'sumaform_backend', choices: ['libvirt', 'aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), + choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), + choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + booleanParam(name: 'terraform_init', defaultValue: true, description: 'Call terraform init (needed if modules are added or changes)'), + booleanParam(name: 'terraform_taint', defaultValue: true, description: 'Call terraform taint (so the resources, except volumes, are recreated)'), + booleanParam(name: 'use_previous_terraform_state', defaultValue: false, description: 'Use previous Terraform state'), + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + timeout(activity: false, time: 3, unit: 'HOURS') { + def pipeline = load "jenkins_pipelines/environments/common/pipeline-salt-shaker.groovy" + pipeline.run(params) + } +} diff --git a/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-slmicro62-bundle b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-slmicro62-bundle new file mode 100644 index 000000000..a4dc63c9e --- /dev/null +++ b/jenkins_pipelines/environments/salt-shaker/manager-salt-shaker-products-testing-slmicro62-bundle @@ -0,0 +1,50 @@ +#!/usr/bin/env groovy + +node('salt-shaker-tests') { + properties([ + buildDiscarder(logRotator(numToKeepStr: '20', daysToKeepStr: '4', artifactNumToKeepStr: '3')), + disableConcurrentBuilds(), + pipelineTriggers([ + URLTrigger( + cronTabSpec: '* * * * *', + triggerLabel: "salt-shaker-tests", + labelRestriction: true, + entries: [URLTriggerEntry( + url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/testing:/testsuite/SLFO/repodata/repomd.xml', + contentTypes: [MD5Sum()] + )] + ), + cron('H 0 * * *')], + ), + parameters([ + choice(name: 'salt_flavor', choices: ['bundle'], description: 'Run testsuite for classic Salt or Salt Bundle'), + booleanParam(name: 'run_unit_tests', defaultValue: true, description: 'Run the Salt unit tests'), + booleanParam(name: 'run_integration_tests', defaultValue: true, description: 'Run the Salt integration tests'), + booleanParam(name: 'run_functional_tests', defaultValue: true, description: 'Run the Salt functional tests'), + string(name: 'testsuite_dir', defaultValue: '/opt/salt-testsuite-bundle/', description: 'Optional: Run testsuite from this directory'), + string(name: 'wait_after_deploy', defaultValue: '120', description: 'Optional: Seconds to wait after deployment is done (usually to allow transactional systems to reboot)'), + string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'), + string(name: 'skip_list_url', defaultValue: 'https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml', description: 'URL to the skiplist.toml file to run Salt shaker'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro62-Bundle.tf', description: 'Path to the tf file to be used'), + string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), + string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), + choice(name: 'sumaform_backend', choices: ['libvirt', 'aws'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), + choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), + choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), + string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), + string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), + string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + booleanParam(name: 'terraform_init', defaultValue: true, description: 'Call terraform init (needed if modules are added or changes)'), + booleanParam(name: 'terraform_taint', defaultValue: true, description: 'Call terraform taint (so the resources, except volumes, are recreated)'), + booleanParam(name: 'use_previous_terraform_state', defaultValue: false, description: 'Use previous Terraform state'), + ]) + ]) + + stage('Checkout pipeline') { + checkout scm + } + timeout(activity: false, time: 3, unit: 'HOURS') { + def pipeline = load "jenkins_pipelines/environments/common/pipeline-salt-shaker.groovy" + pipeline.run(params) + } +} diff --git a/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES16-Bundle.tf b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES16-Bundle.tf new file mode 100644 index 000000000..03f0f7def --- /dev/null +++ b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES16-Bundle.tf @@ -0,0 +1,118 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/user/manager/my-views/view/Salt%20Shaker/job/manager-salt-shaker-products-next-sles16-bundle" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "echo EXECUTE SALT TESTS HERE" +} +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results Salt Shaker - products:next - SLES16 Salt Bundle $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../../mail_templates/mail-template-salt-shaker.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results Salt Shaker - products:next - SLES16 Salt Bundle: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../../mail_templates/mail-template-salt-shaker-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "salt-shaker@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "salt-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string + default = null // Not needed for Salt tests +} + +variable "SCC_PASSWORD" { + type = string + default = null // Not needed for Salt tests +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.8.1" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-04.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + use_avahi = false + domain = "mgr.suse.de" + + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + } + + images = [ "sles16o" ] +} + +module "salt-shaker-products-next" { + source = "./modules/salt_testenv" + base_configuration = module.base.configuration + + name = "salt-shaker-products-next-sles16-bundle" + image = "sles16o" + salt_obs_flavor = "saltstack:products:next" + provider_settings = { + mac = "aa:b2:93:02:02:0f" + } +} + +output "configuration" { + value = module.salt-shaker-products-next.configuration +} diff --git a/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro62-Bundle.tf b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro62-Bundle.tf new file mode 100644 index 000000000..f60499d78 --- /dev/null +++ b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro62-Bundle.tf @@ -0,0 +1,118 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/user/manager/my-views/view/Salt%20Shaker/job/manager-salt-shaker-products-next-slmicro62-bundle" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "echo EXECUTE SALT TESTS HERE" +} +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results Salt Shaker - products:next - SLMicro6.1 Salt Bundle $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../../mail_templates/mail-template-salt-shaker.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results Salt Shaker - products:next - SLMicro6.1 Salt Bundle: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../../mail_templates/mail-template-salt-shaker-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "salt-shaker@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "salt-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string + default = null // Not needed for Salt tests +} + +variable "SCC_PASSWORD" { + type = string + default = null // Not needed for Salt tests +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.8.1" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-04.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + use_avahi = false + domain = "mgr.suse.de" + + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + } + + images = [ "slmicro62o" ] +} + +module "salt-shaker-products-next" { + source = "./modules/salt_testenv" + base_configuration = module.base.configuration + + name = "salt-shaker-products-next-slmicro62-bundle" + image = "slmicro62o" + salt_obs_flavor = "saltstack:products:next" + provider_settings = { + mac = "aa:b2:93:02:02:10" + } +} + +output "configuration" { + value = module.salt-shaker-products-next.configuration +} diff --git a/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES16-Bundle.tf b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES16-Bundle.tf new file mode 100644 index 000000000..c71733b02 --- /dev/null +++ b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES16-Bundle.tf @@ -0,0 +1,118 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/user/manager/my-views/view/Salt%20Shaker/job/manager-salt-shaker-products-testing-sles16-bundle" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "echo EXECUTE SALT TESTS HERE" +} +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results Salt Shaker - saltstack:products:testing - SLES16 Salt Bundle $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../../mail_templates/mail-template-salt-shaker.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results Salt Shaker - saltstack:products:testing - SLES16 Salt Bundle: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../../mail_templates/mail-template-salt-shaker-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "salt-shaker@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "salt-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string + default = null // Not needed for Salt tests +} + +variable "SCC_PASSWORD" { + type = string + default = null // Not needed for Salt tests +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.8.1" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-03.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + use_avahi = false + domain = "mgr.suse.de" + + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + } + + images = [ "sles16o" ] +} + +module "salt-shaker-products-testing" { + source = "./modules/salt_testenv" + base_configuration = module.base.configuration + + name = "salt-shaker-products-testing-sles16-bundle" + image = "sles16o" + salt_obs_flavor = "saltstack:products:testing" + provider_settings = { + mac = "aa:b2:93:02:02:2c" + } +} + +output "configuration" { + value = module.salt-shaker-products-testing.configuration +} diff --git a/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro62-Bundle.tf b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro62-Bundle.tf new file mode 100644 index 000000000..42984e6f4 --- /dev/null +++ b/terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro62-Bundle.tf @@ -0,0 +1,118 @@ +// Mandatory variables for terracumber +variable "URL_PREFIX" { + type = string + default = "https://ci.suse.de/user/manager/my-views/view/Salt%20Shaker/job/manager-salt-shaker-products-testing-slmicro62-bundle" +} + +// Not really used as this is for --runall parameter, and we run cucumber step by step +variable "CUCUMBER_COMMAND" { + type = string + default = "echo EXECUTE SALT TESTS HERE" +} +variable "CUCUMBER_BRANCH" { + type = string + default = "master" +} + +variable "CUCUMBER_RESULTS" { + type = string + default = "/root/" +} + +variable "MAIL_SUBJECT" { + type = string + default = "Results Salt Shaker - products:testing - SLMicro6.0 Salt Bundle $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" +} + +variable "MAIL_TEMPLATE" { + type = string + default = "../../mail_templates/mail-template-salt-shaker.txt" +} + +variable "MAIL_SUBJECT_ENV_FAIL" { + type = string + default = "Results Salt Shaker - products:testing - SLMicro6.0 Salt Bundle: Environment setup failed" +} + +variable "MAIL_TEMPLATE_ENV_FAIL" { + type = string + default = "../../mail_templates/mail-template-salt-shaker-env-fail.txt" +} + +variable "MAIL_FROM" { + type = string + default = "salt-shaker@suse.de" +} + +variable "MAIL_TO" { + type = string + default = "salt-ci@suse.de" +} + +// sumaform specific variables +variable "SCC_USER" { + type = string + default = null // Not needed for Salt tests +} + +variable "SCC_PASSWORD" { + type = string + default = null // Not needed for Salt tests +} + +variable "GIT_USER" { + type = string + default = null // Not needed for master, as it is public +} + +variable "GIT_PASSWORD" { + type = string + default = null // Not needed for master, as it is public +} + +terraform { + required_version = "1.0.10" + required_providers { + libvirt = { + source = "dmacvicar/libvirt" + version = "0.8.1" + } + } +} + +provider "libvirt" { + uri = "qemu+tcp://suma-03.mgr.suse.de/system" +} + +module "base" { + source = "./modules/base" + + cc_username = var.SCC_USER + cc_password = var.SCC_PASSWORD + use_avahi = false + domain = "mgr.suse.de" + + provider_settings = { + pool = "ssd" + network_name = null + bridge = "br1" + } + + images = [ "slmicro62o" ] +} + +module "salt-shaker-products-testing" { + source = "./modules/salt_testenv" + base_configuration = module.base.configuration + + name = "salt-shaker-products-testing-slmicro62-bundle" + image = "slmicro62o" + salt_obs_flavor = "saltstack:products:testing" + provider_settings = { + mac = "aa:b2:93:02:02:2d" + } +} + +output "configuration" { + value = module.salt-shaker-products-testing.configuration +}