Skip to content

Commit

Permalink
Temporary using a fork of Terracumber to support QAM
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios committed Jul 28, 2020
1 parent 083a1c2 commit 2435f5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ def run(params) {
}
stage('Deploy') {
if(params.must_deploy) {
// Generate json file in the workspace
writeFile file: 'mu_repositories.json', text: params.mu_repositories, encoding: "UTF-8"
// Provision the environment
if (params.terraform_init) {
env.TERRAFORM_INIT = '--init'
} else {
env.TERRAFORM_INIT = ''
}
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"
// Run Terracumber to deploy the environment
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"
deployed = true
}
}
Expand Down
4 changes: 2 additions & 2 deletions jenkins_pipelines/environments/manager-4.0-qam-setup-cucumber
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ node('sumaform-cucumber') {
choice(name: 'sumaform_backend', choices: ['libvirt'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'),
choice(name: 'terraform_bin', choices: ['/usr/bin/terraform_bin'], description: 'Terraform binary path'),
choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'),
string(name: 'terracumber_gitrepo', defaultValue: 'https://gitlab.suse.de/juliogonzalezgil/terracumber.git', description: 'Terracumber Git Repository'),
string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'),
string(name: 'terracumber_gitrepo', defaultValue: 'https://gitlab.suse.de/oscar-barrios/terracumber.git', description: 'Terracumber Git Repository'),
string(name: 'terracumber_ref', defaultValue: 'qam-support', description: 'Terracumber Git ref (branch, tag...)'),
booleanParam(name: 'terraform_init', defaultValue: false, description: 'Call terraform init (needed if modules are added or changes)'),
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'),
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ node('sumaform-cucumber') {
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'),
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'),
booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'),
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber')
choice(name: 'rake_namespace', choices: ['cucumber'], description: 'Choose parallel or cucumber'),
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')
])
])

Expand Down

0 comments on commit 2435f5d

Please sign in to comment.