Skip to content

Commit

Permalink
feat: Add maven-rpm pipelines (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Serdiuk authored and SergK committed Sep 12, 2024
1 parent f13dbda commit 40b9ff2
Show file tree
Hide file tree
Showing 18 changed files with 1,087 additions and 778 deletions.
4 changes: 2 additions & 2 deletions charts/common-library/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: A Helm chart library with common components for KubeRocketCI Tekton
home: https://docs.kuberocketci.io
name: edp-tekton-common-library
type: library
version: 0.3.2
appVersion: 0.3.2
version: 0.3.3
appVersion: 0.3.3
icon: https://docs.kuberocketci.io/img/logo.svg
keywords:
- edp
Expand Down
2 changes: 1 addition & 1 deletion charts/common-library/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# edp-tekton-common-library

![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.3.2](https://img.shields.io/badge/AppVersion-0.3.2-informational?style=flat-square)
![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.3.3](https://img.shields.io/badge/AppVersion-0.3.3-informational?style=flat-square)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/epmdedp)](https://artifacthub.io/packages/search?repo=epmdedp)

A Helm chart library with common components for KubeRocketCI Tekton Pipelines
Expand Down
36 changes: 36 additions & 0 deletions charts/common-library/templates/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,42 @@
workspace: ssh-creds
{{- end -}}

{{- define "build-pipeline-rpm-end" -}}
- name: git-tag
taskRef:
kind: Task
name: git-cli
runAfter:
- rpm-build
params:
- name: GIT_USER_EMAIL
value: [email protected]
- name: GIT_USER_NAME
value: edp-ci
- name: GIT_SCRIPT
value: |
git tag -a "$(tasks.get-version.results.VCS_TAG)" -m "Tag is added automatically by CI user"
git push --tags
workspaces:
- name: source
workspace: shared-workspace
subPath: source
- name: ssh-directory
workspace: ssh-creds

- name: update-cbis
taskRef:
kind: Task
name: update-cbis
runAfter:
- git-tag
params:
- name: CBIS_NAME
value: $(tasks.init-values.results.RESULT_IMAGE_NAME)
- name: IMAGE_TAG
value: $(tasks.get-version.results.IS_TAG)
{{- end -}}

# final section for gerrit codereview pipelines
{{- define "gerrit-review-vote" -}}
finally:
Expand Down
6 changes: 3 additions & 3 deletions charts/pipelines-library/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: edp-tekton-common-library
repository: file://../common-library
version: 0.3.2
version: 0.3.3
- name: tekton-cache
repository: https://epam.github.io/edp-helm-charts/stable
version: 0.3.2
digest: sha256:c87624f27568453fcafbc80ae52e150be8a0184b661204243ba52537ad52976a
generated: "2024-08-07T20:35:04.587201+03:00"
digest: sha256:e115a449313465ccfa7e3e8042f736c1cfa19dc70c6aa062de33d4ca0c6d1578
generated: "2024-09-11T20:04:50.187445+03:00"
2 changes: 1 addition & 1 deletion charts/pipelines-library/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ annotations:
# we use templates from common library
dependencies:
- name: edp-tekton-common-library
version: 0.3.2
version: 0.3.3
repository: "file://../common-library"
- name: tekton-cache
version: 0.3.2
Expand Down
2 changes: 1 addition & 1 deletion charts/pipelines-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinter
| Repository | Name | Version |
|------------|------|---------|
| @epamedp | tekton-cache | 0.3.2 |
| file://../common-library | edp-tekton-common-library | 0.3.2 |
| file://../common-library | edp-tekton-common-library | 0.3.3 |

## Values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,87 @@
workspace: shared-workspace
subPath: source
{{- end -}}

{{- define "build-pipeline-java-maven-rpm-build-push-default" -}}
- name: rpm-build
taskRef:
kind: Task
name: rpm-build
runAfter:
- get-maven-module
- push
- build
params:
- name: suffix
value: "$(tasks.get-version.results.NORMALIZED_VERSION)"
- name: EXTRA_LINT_COMMAND
value: |
make rpm-lint
- name: EXTRA_BUILD_COMMAND
value: |
make rpm-build RELEASE=${SUFFIX}
- name: EXTRA_PUSH_COMMAND
value: |
make rpm-publish RELEASE=${SUFFIX}
workspaces:
- name: source
workspace: shared-workspace
subPath: source
{{- end -}}

{{- define "build-pipeline-java-maven-rpm-build-push-edp" -}}
- name: rpm-build
taskRef:
kind: Task
name: rpm-build
runAfter:
- get-maven-module
- push
- build
params:
- name: suffix
value: "$(tasks.get-version.results.SUFFIX)"
- name: numeric_version
value: "$(tasks.get-version.results.NUMERIC_VERSION)"
- name: EXTRA_LINT_COMMAND
value: |
make rpm-lint
- name: EXTRA_BUILD_COMMAND
value: |
make rpm-build VERSION=${NUMERIC_VERSION} RELEASE=${SUFFIX}
- name: EXTRA_PUSH_COMMAND
value: |
make rpm-publish RELEASE=${SUFFIX} VERSION=${NUMERIC_VERSION}
workspaces:
- name: source
workspace: shared-workspace
subPath: source
{{- end -}}

{{- define "build-pipeline-java-maven-rpm-review" -}}
- name: rpm-build
taskRef:
kind: Task
name: rpm-build
runAfter:
- get-maven-module
- build
params:
- name: suffix
value: "0.0.0"
- name: numeric_version
value: "SNAPSHOT.1"
- name: EXTRA_LINT_COMMAND
value: |
make rpm-lint
- name: EXTRA_BUILD_COMMAND
value: |
make rpm-build VERSION=${NUMERIC_VERSION} RELEASE=${SUFFIX}
- name: EXTRA_PUSH_COMMAND
value: |
echo "Review pipeline - skip push step"
workspaces:
- name: source
workspace: shared-workspace
subPath: source
{{- end -}}
Loading

0 comments on commit 40b9ff2

Please sign in to comment.