Skip to content

Commit

Permalink
chore: Merge the steps of the push-to-jira task into a single step to…
Browse files Browse the repository at this point in the history
… avoid the necessity of using volumes (#87)

Jira: EPMDEDP-12959

Related: #87

Change-Id: I50e7274ab4cdd2e440d3b9fbbff43be4c1ffcd09
  • Loading branch information
oleksandr_taruraiev committed Dec 11, 2023
1 parent fec7260 commit 32b68ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
4 changes: 0 additions & 4 deletions charts/common-library/templates/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ finally:
value: "$(tasks.get-version.results.VCS_TAG)"
- name: VERSION
value: "$(tasks.get-version.results.VERSION)"
workspaces:
- name: source
workspace: shared-workspace
subPath: source
{{- end -}}

{{- define "send-to-microsoft-teams-build" -}}
Expand Down
20 changes: 5 additions & 15 deletions charts/pipelines-library/templates/tasks/push-to-jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ spec:
description: >-
The push-to-jira Task will create JiraIssueMetadata Custom Resource
workspaces:
- name: source
description: The workspace consisting of the cr file and project files.
params:
- name: TICKET_NAME_PATTERN
type: string
Expand All @@ -33,8 +30,7 @@ spec:
type: string
steps:
- name: push-to-jira
image: python:3.10.1-alpine3.15
workingDir: $(workspaces.source.path)
image: epamedp/tekton-autotest:0.1.3
env:
- name: TICKET_NAME_PATTERN
value: "$(params.TICKET_NAME_PATTERN)"
Expand All @@ -53,7 +49,7 @@ spec:
- name: VERSION
value: "$(params.VERSION)"
script: |
#!/usr/bin/env python
#!/usr/bin/python
import os
import sys
Expand Down Expand Up @@ -159,12 +155,6 @@ spec:
with open("cr.json", "w") as outfile:
outfile.write(template_json)
- name: kubectl
image: bitnami/kubectl:1.25.2
workingDir: $(workspaces.source.path)
script: |
#!/usr/bin/env bash
set -e
echo "[TEKTON][DEBUG] Trying to create JiraIssueMetadata CR"
kubectl apply -f cr.json
echo "[TEKTON][DEBUG] JiraIssueMetadata CR has been created"
print("[TEKTON][DEBUG] Trying to create JiraIssueMetadata CR")
os.system('kubectl apply -f cr.json')
print("[TEKTON][DEBUG] JiraIssueMetadata CR has been created")

0 comments on commit 32b68ed

Please sign in to comment.