Skip to content
Snippets Groups Projects

Draft: Repair cluster-build pipeline

Merged Robert Schmidt requested to merge build-cluster-hotfix into develop
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
+ 2
1
@@ -236,7+236,7 @@
forceBaseImageBuild = True
# logging to OC Cluster and then switch to corresponding project
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server {self.OCUrl}', '\$', 31)
if mySSH.getBefore().count('Login successful.') == 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
mySSH.close()
@@ -258,7+258,7 @@
if forceBaseImageBuild:
self._recreate_is_tag(mySSH, 'ran-base', baseTag, 'openshift/ran-base-is.yaml')
self._recreate_bc(mySSH, 'ran-base', baseTag, 'openshift/ran-base-bc.yaml')
ranbase_job = self._start_build(mySSH, 'ran-base')
attemptedImages += ['ran-base']
status = ranbase_job is not None and self._wait_build_end(mySSH, [ranbase_job], 600)
if not status: logging.error('failure during build of ran-base')
@@ -348,7+348,7 @@
build_log_name = f'build_log_{self.testCase_id}'
cls_containerize.CopyLogsToExecutor(mySSH, lSourcePath, build_log_name, lIpAddr, 'oaicicd', CONST.CI_NO_PASSWORD)
mySSH.command(f'oc get images | grep -e \'{"\|".join(attemptedImages)}\' > {build_log_name}/image_registry.log', '\$', 10);
grep_exp = "\|".join(attemptedImages)
mySSH.command(f'oc get images | grep -e \'{grep_exp}\' > {build_log_name}/image_registry.log', '\$', 10);
mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc delete pod ${pod}; done', '\$', 60)
Loading