Skip to content

Commit 7fb87a9

Browse files
committed
Temporary using a fork of Terracumber to support QAM
1 parent 083a1c2 commit 7fb87a9

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

jenkins_pipelines/environments/common/pipeline-qam-setup.groovy

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ def run(params) {
1919
}
2020
stage('Deploy') {
2121
if(params.must_deploy) {
22+
// Generate json file in the workspace
23+
writeFile file: 'mu_repositories.json', text: params.mu_repositories, encoding: "UTF-8"
2224
// Provision the environment
2325
if (params.terraform_init) {
2426
env.TERRAFORM_INIT = '--init'
2527
} else {
2628
env.TERRAFORM_INIT = ''
2729
}
28-
sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision"
30+
// Run Terracumber to deploy the environment
31+
sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log ${env.TERRAFORM_INIT} --taint '.*(domain|main_disk).*' --runstep provision --mu-repositories ${WORKSPACE}/mu_repositories.json"
2932
deployed = true
3033
}
3134
}

jenkins_pipelines/environments/manager-4.0-qam-setup-cucumber

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ node('sumaform-cucumber') {
1313
choice(name: 'sumaform_backend', choices: ['libvirt'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'),
1414
choice(name: 'terraform_bin', choices: ['/usr/bin/terraform_bin'], description: 'Terraform binary path'),
1515
choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'),
16-
string(name: 'terracumber_gitrepo', defaultValue: 'https://gitlab.suse.de/juliogonzalezgil/terracumber.git', description: 'Terracumber Git Repository'),
17-
string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'),
16+
string(name: 'terracumber_gitrepo', defaultValue: 'https://gitlab.suse.de/oscar-barrios/terracumber.git', description: 'Terracumber Git Repository'),
17+
string(name: 'terracumber_ref', defaultValue: 'qam-support', description: 'Terracumber Git ref (branch, tag...)'),
1818
booleanParam(name: 'terraform_init', defaultValue: false, description: 'Call terraform init (needed if modules are added or changes)'),
1919
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'),
2020
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'),
2121
booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'),
22-
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber')
22+
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber'),
23+
text(name: 'mu_repositories', defaultValue: '{"server":"http://download.suse.de/ibs/SUSE:/Maintenance:/12947/SUSE_Updates_SLE-Module-SUSE-Manager-Server_4.0_x86_64/","proxy":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12947/SUSE_Updates_SLE-Module-SUSE-Manager-Server_4.0_x86_64/"},"sle11sp4_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12934/SUSE_Updates_SLE-SERVER_11-SP4-CLIENT-TOOLS_x86_64/"},"sle11sp4_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12934/SUSE_Updates_SLE-SERVER_11-SP3-CLIENT-TOOLS_x86_64/"},"sle12sp4_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12956/SUSE_Updates_SLE-Manager-Tools_12_x86_64/"},"sle12sp4_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12966/SUSE_Updates_SLE-Manager-Tools_12_x86_64/"},"sle15_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12957/SUSE_Updates_SLE-Module-Basesystem_15_x86_64/"},"sle15_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12967/SUSE_Updates_SLE-Manager-Tools_15-SP1_x86_64/"},"sle15sp1_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12958/SUSE_Updates_SLE-Module-Basesystem_15-SP1_x86_64/"},"sle15sp1_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12967/SUSE_Updates_SLE-Manager-Tools_15_x86_64/"},"ubuntu1804_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12961/SUSE_Updates_Ubuntu_18.04-CLIENT-TOOLS_x86_64/"},"ceos7_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12954/SUSE_Updates_RES_7-CLIENT-TOOLS_x86_64/"},"ceos7_client":{"traditional":" http://download.suse.de/ibs/SUSE:/Maintenance:/12933/SUSE_Updates_RES_7-CLIENT-TOOLS_x86_64/"}}', description: 'Salt & Traditional MU Repositories for each client, in json format')
2324
])
2425
])
2526

jenkins_pipelines/environments/manager-4.1-qam-setup-cucumber

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ node('sumaform-cucumber') {
1919
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'),
2020
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'),
2121
booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'),
22-
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber')
22+
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber'),
23+
text(name: 'mu_repositories', defaultValue: '{"server":"http://download.suse.de/ibs/SUSE:/Maintenance:/12947/SUSE_Updates_SLE-Module-SUSE-Manager-Server_4.0_x86_64/","proxy":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12947/SUSE_Updates_SLE-Module-SUSE-Manager-Server_4.0_x86_64/"},"sle11sp4_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12934/SUSE_Updates_SLE-SERVER_11-SP4-CLIENT-TOOLS_x86_64/"},"sle11sp4_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12934/SUSE_Updates_SLE-SERVER_11-SP3-CLIENT-TOOLS_x86_64/"},"sle12sp4_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12956/SUSE_Updates_SLE-Manager-Tools_12_x86_64/"},"sle12sp4_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12966/SUSE_Updates_SLE-Manager-Tools_12_x86_64/"},"sle15_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12957/SUSE_Updates_SLE-Module-Basesystem_15_x86_64/"},"sle15_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12967/SUSE_Updates_SLE-Manager-Tools_15-SP1_x86_64/"},"sle15sp1_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12958/SUSE_Updates_SLE-Module-Basesystem_15-SP1_x86_64/"},"sle15sp1_client":{"traditional":"http://download.suse.de/ibs/SUSE:/Maintenance:/12967/SUSE_Updates_SLE-Manager-Tools_15_x86_64/"},"ubuntu1804_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12961/SUSE_Updates_Ubuntu_18.04-CLIENT-TOOLS_x86_64/"},"ceos7_minion":{"salt":"http://download.suse.de/ibs/SUSE:/Maintenance:/12954/SUSE_Updates_RES_7-CLIENT-TOOLS_x86_64/"},"ceos7_client":{"traditional":" http://download.suse.de/ibs/SUSE:/Maintenance:/12933/SUSE_Updates_RES_7-CLIENT-TOOLS_x86_64/"}}', description: 'Salt & Traditional MU Repositories for each client, in json format')
2324
])
2425
])
2526

0 commit comments

Comments
 (0)