Reboot HW servers for bm-depoyments (doesn'r require starting of deploy-bm job)
Also added TCP_QA_REFS option to deploy_bm job
PROD-36050
Change-Id: I413e3d34986fdb7a55967ba151a7a878c98535f2
diff --git a/jobs/pipelines/deploy-cicd-and-run-tests.groovy b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
index 7207b84..07684cf 100644
--- a/jobs/pipelines/deploy-cicd-and-run-tests.groovy
+++ b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
@@ -28,6 +28,18 @@
shared.prepare_working_dir(env_manager)
}
+ // Reboot Hardware before the BM deployments
+ if ("$ENV_NAME".contains("bm-")){
+ reboot_hw_nodes = env.REBOOT_HW_NODES ?: false
+ stage("Reboot HW nodes") {
+ if (reboot_hw_nodes) {
+ shared.reboot_hardware_nodes()
+ } else {
+ common.printMsg("REBOOT_HW_NODES is disabled. Skipping this stage...", "blue")
+ }
+ }
+ }
+
stage("Create environment, generate model, bootstrap the salt-cluster") {
// steps: "hardware,create_model,salt"
if (env_manager == 'devops') {
diff --git a/jobs/pipelines/rotation_bm_deployments.groovy b/jobs/pipelines/rotation_bm_deployments.groovy
index 49103a9..222f96a 100644
--- a/jobs/pipelines/rotation_bm_deployments.groovy
+++ b/jobs/pipelines/rotation_bm_deployments.groovy
@@ -61,36 +61,6 @@
}
}
- stage("Reboot HW nodes ") {
- bm_ips = [
- "185.8.59.227",
- "185.8.59.229",
- "5.43.225.88",
- "5.43.225.112",
- "5.43.225.208",
- "5.43.227.118",
- "185.8.58.248",
- "185.8.59.222",
- "5.43.225.228",
- "5.43.229.28",
- "5.43.225.23",
- "185.8.58.9",
- "185.8.58.246",
- "185.8.58.243",
- "185.8.58.244"
- ]
-
- withCredentials([
- [$class : 'UsernamePasswordMultiBinding',
- credentialsId : 'lab_engineer',
- passwordVariable: 'lab_pass',
- usernameVariable: 'lab_user']
- ]) {
- for (ip in bm_ips) { sh ("ipmitool -H ${ip} -U ${lab_user} -P ${lab_pass} chassis power off")}
- for (ip in bm_ips) { sh ("ipmitool -H ${ip} -U ${lab_user} -P ${lab_pass} chassis bootdev pxe")}
- }
- }
-
stage("Start deployment") {
def jobs_map = [:]
for (stack_name in stacks) {
@@ -106,7 +76,8 @@
def deploy = build job: "${stack_to_deploy}",
parameters: [
string(name: 'PARENT_NODE_NAME', value: env.PARENT_NODE_NAME),
- string(name: 'OS_CREDENTIALS', value: env.OS_CREDENTIALS)
+ string(name: 'OS_CREDENTIALS', value: env.OS_CREDENTIALS),
+ string(name: 'TCP_QA_REFS', value: env.TCP_QA_REFS)
]
}
}