Skip to content

Commit fe3e98e

Browse files
committed
Update the SSH Keys.
1 parent 960e9a5 commit fe3e98e

11 files changed

Lines changed: 33 additions & 11 deletions

File tree

jenkins_pipelines/environments/common/pipeline-build-validation.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ def run(params) {
124124
commonArgs += " --inject SERVER_CONTAINER_IMAGE=${server_container_image}"
125125
commonArgs += " --inject CUCUMBER_GITREPO=${params.cucumber_gitrepo}"
126126
commonArgs += " --inject CUCUMBER_BRANCH=${params.cucumber_ref}"
127-
commonArgs += " --inject PRIVATE_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.worker\""
128-
commonArgs += " --inject PUBLIC_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.pub.controller\""
127+
if (isNewJenkins) {
128+
commonArgs += " --inject PRIVATE_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.worker\""
129+
commonArgs += " --inject PUBLIC_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.pub.controller\""
130+
}
129131
if (product_version) { commonArgs += " --inject PRODUCT_VERSION=${product_version}" }
130132
if (base_os) { commonArgs += " --inject BASE_OS=${base_os}" }
131133
if (fileExists('custom_repositories.json')) {

jenkins_pipelines/environments/common/pipeline-personal.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def run(params) {
7474
if (params.container_repository != '') {
7575
sh "echo 'CONTAINER_REPOSITORY=\"${params.container_repository}\"' >> ${resultdir}/sumaform/terraform.tfvars"
7676
}
77+
if (isNewJenkins) {
78+
sh "echo PRIVATE_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.worker\" >> ${resultdir}/sumaform/terraform.tfvars"
79+
sh "echo PUBLIC_SSH_KEY_PATH=\"/home/jenkins/.ssh/id_ed25519.pub.controller\" >> ${resultdir}/sumaform/terraform.tfvars"
80+
}
7781
sh """
7882
#!/bin/bash
7983
set -e -o pipefail

terracumber_config/tf_files/personal/main_43.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module "cucumber_testsuite" {
3030

3131
images = ["rocky8o", "opensuse156o", "sles15sp4o", "ubuntu2204o"]
3232

33+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3334
use_avahi = false
3435
name_prefix = "${var.ENVIRONMENT}-"
3536
domain = "mgr.suse.de"

terracumber_config/tf_files/personal/main_50.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "slemicro55o"]
3838

39-
ssh_key_path = "/home/jenkins/.ssh/id_ed25519.pub.controller"
39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
4040
use_avahi = false
4141
name_prefix = "${var.ENVIRONMENT}-"
4242
domain = "mgr.suse.de"
@@ -145,7 +145,7 @@ module "cucumber_testsuite" {
145145
hypervisor = {
146146
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
147147
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
148-
private_key = file("~/.ssh/id_ed25519")
148+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
149149
}
150150
}
151151
kvm_host = {

terracumber_config/tf_files/personal/main_51.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module "cucumber_testsuite" {
3737

3838
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "slmicro61o"]
3939

40-
ssh_key_path = "/home/jenkins/.ssh/id_ed25519.pub"
40+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
4141
use_avahi = false
4242
name_prefix = "${var.ENVIRONMENT}-"
4343
domain = "mgr.suse.de"
@@ -146,7 +146,7 @@ module "cucumber_testsuite" {
146146
hypervisor = {
147147
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
148148
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
149-
private_key = file("~/.ssh/id_ed25519")
149+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
150150
}
151151
}
152152
}

terracumber_config/tf_files/personal/main_head.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "slmicro61o", "slmicro62o"]
3838

39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3940
use_avahi = false
4041
name_prefix = "${var.ENVIRONMENT}-"
4142
domain = "mgr.suse.de"
@@ -142,7 +143,7 @@ module "cucumber_testsuite" {
142143
hypervisor = {
143144
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
144145
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
145-
private_key = file("~/.ssh/id_ed25519")
146+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
146147
}
147148
}
148149
}

terracumber_config/tf_files/personal/main_head_staging.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "slmicro61o", "slmicro62o"]
3838

39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3940
use_avahi = false
4041
name_prefix = "${var.ENVIRONMENT}-"
4142
domain = "mgr.suse.de"
@@ -142,7 +143,7 @@ module "cucumber_testsuite" {
142143
hypervisor = {
143144
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
144145
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
145-
private_key = file("~/.ssh/id_ed25519")
146+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
146147
}
147148
}
148149
}

terracumber_config/tf_files/personal/main_rke_head.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "slmicro61o"]
3838

39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3940
use_avahi = false
4041
name_prefix = "${var.ENVIRONMENT}-"
4142
domain = "mgr.suse.de"
@@ -152,7 +153,7 @@ module "cucumber_testsuite" {
152153
hypervisor = {
153154
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
154155
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
155-
private_key = file("~/.ssh/id_ed25519")
156+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
156157
}
157158
}
158159
}

terracumber_config/tf_files/personal/main_rke_uyuni.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "tumbleweedo"]
3838

39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3940
use_avahi = false
4041
name_prefix = "${var.ENVIRONMENT}-"
4142
domain = "mgr.suse.de"
@@ -142,7 +143,7 @@ module "cucumber_testsuite" {
142143
hypervisor = {
143144
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
144145
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
145-
private_key = file("~/.ssh/id_ed25519")
146+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
146147
}
147148
}
148149
}

terracumber_config/tf_files/personal/main_uyuni.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "cucumber_testsuite" {
3636

3737
images = ["rocky8o", "opensuse156o", "ubuntu2404o", "sles15sp7o", "tumbleweedo"]
3838

39+
ssh_key_path = var.PUBLIC_SSH_KEY_PATH
3940
use_avahi = false
4041
name_prefix = "${var.ENVIRONMENT}-"
4142
domain = "mgr.suse.de"
@@ -130,7 +131,7 @@ module "cucumber_testsuite" {
130131
hypervisor = {
131132
host = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor
132133
user = var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].dhcp_user
133-
private_key = file("~/.ssh/id_ed25519")
134+
private_key = file(var.PRIVATE_SSH_KEY_PATH)
134135
}
135136
}
136137
}

0 commit comments

Comments
 (0)