Skip to content

Commit

Permalink
Merge branch 'master' into PR_main_tempalte
Browse files Browse the repository at this point in the history
# Conflicts:
#	terracumber_config/tf_files/Uyuni-PR-tests-env1.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env10.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env2.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env3.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env4.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env5.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env6.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env7.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env8.tf
#	terracumber_config/tf_files/Uyuni-PR-tests-env9.tf
  • Loading branch information
maximenoel8 committed Oct 12, 2023
2 parents 6b5a0f0 + 1796b5f commit e2557e5
Show file tree
Hide file tree
Showing 40 changed files with 371 additions and 131 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/sumaform-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Sumaform validation

on:
pull_request:
paths:
- 'terracumber_config/tf_files/**'

jobs:
validate_sumaform:
name: Validate sumaform files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: tf_files
name: Get modified .tf files
uses: Ana06/[email protected]
with:
filter: '*.tf'
- name: Install terraform
if: steps.tf_files.outputs.added_modified
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.10
- name: Checkout sumaform
if: steps.tf_files.outputs.added_modified
uses: actions/checkout@v4
with:
repository: uyuni-project/sumaform
path: sumaform
- name: Validate files
if: steps.tf_files.outputs.added_modified
run: |
# Remove providers to use the 'null' provider
sed -i '/provider *"/,/\}/d' ${{steps.tf_files.outputs.added_modified}}
# Remove libvirt provider dependency
sed -i '/libvirt = {/,/\}/d' ${{steps.tf_files.outputs.added_modified}}
# Setup sumaform with the 'null' backend
cd sumaform
ln -sfn ../backend_modules/null modules/backend
# Set TF variables
export TF_VAR_SCC_USER="user"
export TF_VAR_SCC_PASSWORD="password"
for tf_file in ${{steps.tf_files.outputs.added_modified}}; do
echo "::notice::Validating '`basename $tf_file`'..."
cp ../$tf_file main.tf
# Uncomment for Terraform detailed logging
# export TF_LOG=trace
terraform init -input=false
terraform validate
terraform plan -input=false
echo
done
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For Pull Requests we have these alternative URLs:
that are needed for testing a particular Pull Request. This includes the master repo, the pull request repo, the client
repos and some other repos that are also needed. All those repos are synced using the Build Service API, instead of from
download.opensuse.org.
- http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/dummy/: This is an empty repo used instead of the update repos. This way,
- http://minima-mirror-ci-bv.mgr.prv.suse.net/pull-request-repositories/dummy/ : This is an empty repo used instead of the update repos. This way,
the build is reproducible.
- http://minima-mirror-ci-bv.mgr.prv.suse.net/repositories/systemsmanagement:/sumaform:/images:/libvirt/images/. openSUSE
image for testing Pull Requests built with the open build service. This needs to be copied manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") {
pull_request_number = "master";
first_env = 9;
last_env = 9;
additional_repo_url = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/reference_job_additional_repo";
additional_repo_url = "http://minima-mirror-ci-bv.mgr.prv.suse.net/pull-request-repositories/reference_job_additional_repo";
} else { //regular ci test
first_env = 1;
last_env = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ def run(params) {
env.MASTER_OTHER_REPO = "http://${fqdn_jenkins_node}/workspace/suma-pr${env_number}/repos/${source_project}:Other/${build_repo}/${arch}"
env.MASTER_SUMAFORM_TOOLS_REPO = "http://${fqdn_jenkins_node}/workspace/suma-pr${env_number}/repos/${sumaform_tools_project}/${build_repo}/${arch}"
env.TEST_PACKAGES_REPO = "http://${fqdn_jenkins_node}/workspace/suma-pr${env_number}/repos/${test_packages_project}/rpm/${arch}"
env.UPDATE_REPO = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/some-updates/"
env.UPDATE_REPO = "http://minima-mirror-ci-bv.mgr.prv.suse.net/pull-request-repositories/some-updates/leap/15.4"
if (additional_repo_url == '') {
echo "Adding dummy repo for update repo"
env.ADDITIONAL_REPO_URL = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/dummy/"
env.ADDITIONAL_REPO_URL = "http://minima-mirror-ci-bv.mgr.prv.suse.net/pull-request-repositories/dummy/"
} else {
echo "Adding ${additional_repo_url}"
env.ADDITIONAL_REPO_URL = additional_repo_url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ node('sumaform-cucumber-provo') {
'oracle9_minion, oracle9_ssh_minion, ' +
'rocky8_minion, rocky8_ssh_minion, rocky9_minion, rocky9_ssh_minion, ' +
'ubuntu2004_minion, ubuntu2004_ssh_minion, ubuntu2204_minion, ubuntu2204_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, debian12_minion, debian12_ssh_minion, ' +
'opensuse154arm_minion, opensuse154arm_ssh_minion, ' +
'slemicro51_minion, slemicro51_ssh_minion, slemicro52_minion, slemicro52_ssh_minion, slemicro53_minion, slemicro53_ssh_minion, slemicro54_minion, slemicro54_ssh_minion'
properties([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ node('sumaform-cucumber') {
'oracle9_minion, oracle9_ssh_minion, ' +
'rocky8_minion, rocky8_ssh_minion, rocky9_minion, rocky9_ssh_minion, ' +
'ubuntu2004_minion, ubuntu2004_ssh_minion, ubuntu2204_minion, ubuntu2204_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, debian12_minion, debian12_ssh_minion, ' +
'opensuse154arm_minion, opensuse154arm_ssh_minion, ' +
'opensuse155arm_minion, opensuse155arm_ssh_minion, ' +
'slemicro51_minion, slemicro51_ssh_minion, ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ node('sumaform-cucumber-provo') {
'oracle9_minion, oracle9_ssh_minion, ' +
'rocky8_minion, rocky8_ssh_minion, rocky9_minion, rocky9_ssh_minion, ' +
'ubuntu2004_minion, ubuntu2004_ssh_minion, ubuntu2204_minion, ubuntu2204_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, debian12_minion, debian12_ssh_minion, ' +
'opensuse154arm_minion, opensuse154arm_ssh_minion, ' +
'opensuse155arm_minion, opensuse155arm_ssh_minion, ' +
'slemicro51_minion, slemicro51_ssh_minion, ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node('sumaform-cucumber') {
parameters([
string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/uyuni.git', description: 'Testsuite Git Repository'),
// Temporary: makes sense only for a specific PR at this point
string(name: 'cucumber_ref', defaultValue: 'server-container', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-Test-Hexagon-NUE.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...)'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ node('sumaform-cucumber') {
pipelineTriggers([cron('H H/4 * * *')]),
parameters([
string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/uyuni.git', description: 'Testsuite Git Repository'),
string(name: 'cucumber_ref', defaultValue: 'server-container', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/Uyuni-Master-K3S.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...)'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ node('sumaform-cucumber') {
pipelineTriggers([cron('H H/4 * * *')]),
parameters([
string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/uyuni.git', description: 'Testsuite Git Repository'),
string(name: 'cucumber_ref', defaultValue: 'server-container', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'cucumber_ref', defaultValue: 'master', description: 'Testsuite Git reference (branch, tag...)'),
string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/Uyuni-Master-podman.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...)'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ node('sumaform-cucumber') {
'oracle9_minion, oracle9_ssh_minion, ' +
'rocky8_minion, rocky8_ssh_minion, rocky9_minion, rocky9_ssh_minion, ' +
'ubuntu2004_minion, ubuntu2004_ssh_minion, ubuntu2204_minion, ubuntu2204_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, debian12_minion, debian12_ssh_minion, ' +
'opensuse154arm_minion, opensuse154arm_ssh_minion, ' +
'opensuse155arm_minion, opensuse155arm_ssh_minion, ' +
'slemicro51_minion, slemicro51_ssh_minion, ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ node('sumaform-cucumber-provo') {
'oracle9_minion, oracle9_ssh_minion, ' +
'rocky8_minion, rocky8_ssh_minion, rocky9_minion, rocky9_ssh_minion, ' +
'ubuntu2004_minion, ubuntu2004_ssh_minion, ubuntu2204_minion, ubuntu2204_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, ' +
'debian10_minion, debian10_ssh_minion, debian11_minion, debian11_ssh_minion, debian12_minion, debian12_ssh_minion, ' +
'opensuse154arm_minion, opensuse154arm_ssh_minion, ' +
'opensuse155arm_minion, opensuse155arm_ssh_minion, ' +
'slemicro51_minion, slemicro51_ssh_minion, ' +
Expand Down
2 changes: 1 addition & 1 deletion jenkins_pipelines/environments/uyuni-master-sonarqube
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ node('sumadocker-nue') {
sh "set +x; source /var/lib/jenkins/.sonar-credentials; set -x; " +
"docker run --rm -v \$PWD:/usr/src " +
"-v \$PWD/../.sonar:/opt/sonar-scanner/.sonar " +
"-e SONAR_LOGIN=\$SONAR_LOGIN " +
"-e SONAR_TOKEN=\$SONAR_TOKEN " +
"sonarsource/sonar-scanner-cli"
}
}
Expand Down
18 changes: 0 additions & 18 deletions jenkins_pipelines/uyuni_prs/Jenkinsfile_prs_java_pgsql_tests
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,6 @@ pipeline {
sh "exit \$TESTS_RESULT"
}
}
stage('Scan code and tests results for sonarcloud') {
steps {
echo 'Run sonarcloud scanner'
sh "UYUNI_CLONE=`ls -d uyuni*`; " +
"PR_BASE=`curl -n https://api.github.com/repos/uyuni-project/uyuni/pulls/${params.PR_NUMBER} | grep -A3 '\"base\"' | grep '\"ref\"' | sed 's/^ *\"ref\": \"\\([^\"]*\\)\",/\\1/'`; " +
"PR_BRANCH=`curl -n https://api.github.com/repos/uyuni-project/uyuni/pulls/${params.PR_NUMBER} | grep -A3 '\"head\"' | grep '\"ref\"' | sed 's/^ *\"ref\": \"\\([^\"]*\\)\",/\\1/'`; " +
"cd \$UYUNI_CLONE; " +
"mkdir -p .sonar; " +
"source /var/lib/jenkins/.sonar-credentials; " +
"docker run --rm -v \$PWD:/usr/src " +
"-v \$PWD/../.sonar:/opt/sonar-scanner/.sonar " +
"-e SONAR_LOGIN " +
"sonarsource/sonar-scanner-cli " +
"-Dsonar.pullrequest.key=${params.PR_NUMBER} " +
"-Dsonar.pullrequest.branch=\$PR_BRANCH " +
"-Dsonar.pullrequest.base=\$PR_BASE"
}
}
}

post {
Expand Down
2 changes: 1 addition & 1 deletion terracumber_config/tf_files/SUSEManager-4.2-AWS-uyuni.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down
2 changes: 1 addition & 1 deletion terracumber_config/tf_files/SUSEManager-4.2-NUE.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down
2 changes: 1 addition & 1 deletion terracumber_config/tf_files/SUSEManager-4.2-PRV.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down
2 changes: 1 addition & 1 deletion terracumber_config/tf_files/SUSEManager-4.2-refenv-PRV.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down
2 changes: 1 addition & 1 deletion terracumber_config/tf_files/SUSEManager-4.3-NUE.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down
6 changes: 3 additions & 3 deletions terracumber_config/tf_files/SUSEManager-4.3-PRV.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "MAIL_TEMPLATE_ENV_FAIL" {

variable "MAIL_FROM" {
type = string
default = "galaxy-ci@suse.de"
default = "jenkins@suse.de"
}

variable "MAIL_TO" {
Expand Down Expand Up @@ -222,8 +222,8 @@ module "cucumber_testsuite" {
hvm_disk_image = {
leap = {
hostname = "min-nested"
image = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2"
hash = "http://minima-mirror-ci-bv.mgr.prv.suse.net/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-JeOS.x86_64-OpenStack-Cloud.qcow2.sha256"
image = "http://minima-mirror-ci-bv.mgr.suse.de/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2"
hash = "http://minima-mirror-ci-bv.mgr.suse.de/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2.sha256"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,22 @@ module "ubuntu2004-minion" {
// }
//}

//module "debian12-minion" {
// source = "./modules/minion"
// base_configuration = module.base.configuration
// product_version = "4.3-released"
// name = "min-debian12"
// image = "debian12"
// server_configuration = module.server.configuration
// auto_connect_to_master = false
// use_os_released_updates = false
// ssh_key_path = "./salt/controller/id_rsa.pub"
//
// provider_settings = {
// instance_type = "t3a.medium"
// }
//}

module "rocky8-minion" {
source = "./modules/minion"
base_configuration = module.base.configuration
Expand Down Expand Up @@ -457,7 +473,7 @@ module "ubuntu2004-sshminion" {
instance_type = "t3a.medium"
}
}
//

//module "debian11-sshminion" {
// source = "./modules/sshminion"
// base_configuration = module.base.configuration
Expand All @@ -472,6 +488,20 @@ module "ubuntu2004-sshminion" {
// }
//}

//module "debian12-sshminion" {
// source = "./modules/sshminion"
// base_configuration = module.base.configuration
// product_version = "4.3-released"
// name = "minssh-debian12"
// image = "debian12"
// use_os_released_updates = false
// ssh_key_path = "./salt/controller/id_rsa.pub"
//
// provider_settings = {
// instance_type = "t3a.medium"
// }
//}

module "rocky8-sshminion" {
source = "./modules/sshminion"
base_configuration = module.base.configuration
Expand Down Expand Up @@ -671,6 +701,9 @@ module "controller" {
// debian11_minion_configuration = module.debian11-minion.configuration
// debian11_sshminion_configuration = module.debian11-sshminion.configuration

// debian12_minion_configuration = module.debian12-minion.configuration
// debian12_sshminion_configuration = module.debian12-sshminion.configuration

rhel9_minion_configuration = module.rhel9-minion.configuration

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module "base_core" {
name_prefix = "suma-bv-43-"
use_avahi = false
domain = "mgr.suse.de"
images = [ "sles12sp4o", "sles12sp5o", "sles15sp1o", "sles15sp2o", "sles15sp3o", "sles15sp4o", "sles15sp5o", "slemicro51-ign", "slemicro52-ign", "slemicro53-ign", "slemicro54-ign", "almalinux9o", "centos7o", "libertylinux9o", "oraclelinux9o", "rocky8o", "rocky9o", "ubuntu2004o", "ubuntu2204o", "debian10o", "debian11o", "opensuse154o" ]
images = [ "sles12sp4o", "sles12sp5o", "sles15sp1o", "sles15sp2o", "sles15sp3o", "sles15sp4o", "sles15sp5o", "slemicro51-ign", "slemicro52-ign", "slemicro53-ign", "slemicro54-ign", "almalinux9o", "centos7o", "libertylinux9o", "oraclelinux9o", "rocky8o", "rocky9o", "ubuntu2004o", "ubuntu2204o", "debian10o", "debian11o", "debian12o", "opensuse154o" ]

mirror = "minima-mirror-ci-bv.mgr.suse.de"
use_mirror_images = true
Expand Down Expand Up @@ -684,6 +684,25 @@ module "debian11-minion" {
ssh_key_path = "./salt/controller/id_rsa.pub"
}

module "debian12-minion" {
source = "./modules/minion"
base_configuration = module.base_core.configuration
product_version = "4.3-released"
name = "min-debian12"
image = "debian12o"
provider_settings = {
mac = "aa:b2:92:42:00:bc"
memory = 4096
}

server_configuration = {
hostname = "suma-bv-43-pxy.mgr.suse.de"
}
auto_connect_to_master = false
use_os_released_updates = false
ssh_key_path = "./salt/controller/id_rsa.pub"
}

// WORKAROUND: overdrive3 has been disconnected by mistake
//module "opensuse154arm-minion" {
// providers = {
Expand Down Expand Up @@ -1071,6 +1090,20 @@ module "debian11-sshminion" {
ssh_key_path = "./salt/controller/id_rsa.pub"
}

module "debian12-sshminion" {
source = "./modules/sshminion"
base_configuration = module.base_core.configuration
product_version = "4.3-released"
name = "minssh-debian12"
image = "debian12o"
provider_settings = {
mac = "aa:b2:92:42:00:dc"
memory = 4096
}
use_os_released_updates = false
ssh_key_path = "./salt/controller/id_rsa.pub"
}

// WORKAROUND: overdrive3 has been disconnected by mistake
//module "opensuse154arm-sshminion" {
// providers = {
Expand Down Expand Up @@ -1329,6 +1362,9 @@ module "controller" {
debian11_minion_configuration = module.debian11-minion.configuration
debian11_sshminion_configuration = module.debian11-sshminion.configuration

debian12_minion_configuration = module.debian12-minion.configuration
debian12_sshminion_configuration = module.debian12-sshminion.configuration

// WORKAROUND: overdrive3 has been disconnected by mistake
// opensuse154arm_minion_configuration = module.opensuse154arm-minion.configuration
// opensuse154arm_sshminion_configuration = module.opensuse154arm-sshminion.configuration
Expand Down
Loading

0 comments on commit e2557e5

Please sign in to comment.