From 41f95c5725096e218fa41531fc09502ea17af1cc Mon Sep 17 00:00:00 2001 From: oleksandr_taruraiev Date: Wed, 10 Jan 2024 15:33:55 +0200 Subject: [PATCH] fix: Failed push-to-jira step in build pipeline on okd (#94) Jira EPMDEDP-13045 Related: https://github.com/epam/edp-tekton/issues/94 Change-Id: I505e67672f1c62b902304d5c374a7d170ed59ca6 --- charts/pipelines-library/templates/tasks/push-to-jira.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/charts/pipelines-library/templates/tasks/push-to-jira.yaml b/charts/pipelines-library/templates/tasks/push-to-jira.yaml index c401d4d8..d8e76dba 100644 --- a/charts/pipelines-library/templates/tasks/push-to-jira.yaml +++ b/charts/pipelines-library/templates/tasks/push-to-jira.yaml @@ -151,10 +151,7 @@ spec: template_json = set_params_jira_issue_metadata(metadata_name, [commit_id], [ticket_number], codebase, json.dumps(payload, indent = 4)) - print("[TEKTON] Writing JiraIssueMetadata template to cr.json file") - with open("cr.json", "w") as outfile: - outfile.write(template_json) + print("[TEKTON][DEBUG] Applying JiraIssueMetadata CR") + os.system(f"kubectl apply -f - << EOF\n{template_json}\nEOF") - print("[TEKTON][DEBUG] Trying to create JiraIssueMetadata CR") - os.system('kubectl apply -f cr.json') print("[TEKTON][DEBUG] JiraIssueMetadata CR has been created")