From 68c6a7932869b03ba8383e423dfca0e9d8d75c02 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 6 Sep 2022 10:26:36 +0200 Subject: [PATCH] Replace hard-coded (unused) password with a constant The plan is to migrate the CI to not need any passwords. This constant can be used to give a dummy password. --- ci-scripts/cls_cluster.py | 4 ++-- ci-scripts/constants.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 519769d0a7..a126c74590 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -246,7 +246,7 @@ class Cluster: # Workaround for some servers, we need to erase completely the workspace if self.forcedWorkspaceCleanup: mySSH.command(f'sudo rm -Rf {lSourcePath}', '\$', 15) - self._createWorkspace(mySSH, "SHOULD NOT BE NECESSARY", lSourcePath) + self._createWorkspace(mySSH, CONST.CI_NO_PASSWORD, lSourcePath) # we don't necessarily need a forced workspace cleanup, but in # order to reduce the amount of data send to OpenShift, we @@ -378,7 +378,7 @@ class Cluster: logging.info(f'\u001B[1m{image} size is {imageSize[image]}\u001B[0m') build_log_name = f'build_log_{self.testCase_id}' - cls_containerize.CopyLogsToExecutor(mySSH, lSourcePath, build_log_name, lIpAddr, 'oaicicd', 'SHOULD NOT MATTER') + cls_containerize.CopyLogsToExecutor(mySSH, lSourcePath, build_log_name, lIpAddr, 'oaicicd', CONST.CI_NO_PASSWORD) mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc delete pod ${pod}; done', '\$', 60) diff --git a/ci-scripts/constants.py b/ci-scripts/constants.py index a7ce01615e..17a4ea33fa 100644 --- a/ci-scripts/constants.py +++ b/ci-scripts/constants.py @@ -79,3 +79,7 @@ X2_HO_REQ_STATE__TARGET_RECEIVES_REQ = 1 X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE = 2 X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ = 3 X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK = 10 + +# placeholder for a "don't care" password to gradually transition to +# passwordless CI +CI_NO_PASSWORD = "CIPASSWORDDONTCARE"