Skip to content

Commit

Permalink
feat: Add Support for BitBucket as GitServer (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-nedostup authored and SergK committed Oct 2, 2024
1 parent 447f37f commit 70b5312
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
The edp-tekton repository consolidates elements for Tekton integration with [KubeRocketCI](https://docs.kuberocketci.io) (former EPAM Delivery Platform (EDP)).
and disposes of two main components:

- **KubeRocketCI Interceptor**. Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub or GitLab with the platform specific metadata.
- **KubeRocketCI Interceptor**. Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub, GitLab or BitBucket with the platform specific metadata.
- **Tekton Pipelines**. Consists of [Tekton Tasks, Pipelines, Triggers](https://tekton.dev/docs/pipelines/) and implements KubeRocketCI Pipelines logic. Some of the tasks are forks from [origin source](https://github.com/tektoncd/catalog), the others are platform specific.

## KubeRocketCI Interceptor
Expand Down Expand Up @@ -43,14 +43,14 @@ The helm-chart for interceptor deployment is in the same repository by the [char

## Tekton Pipelines

Tekton Pipelines supports three VCS: Gerrit, GitHub, GitLab. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).
Tekton Pipelines supports four VCS: Gerrit, GitHub, GitLab and BitBucket. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).

Tekton Pipelines are implemented and packaged using the [helm-chart](./charts/pipelines-library/) approach. The helm-chart contains:

- `Tasks` - basic building block for Tekton. Some of the tasks are forks from [Upstream Tekton Catalog](https://github.com/tektoncd/catalog).
- `Pipelines`, which consist of `Tasks` and implement logic for the CI flow. KubeRocketCI follows the below approach for pipelines definition:
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab;
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab and BitBucket;
- KubeRocketCI has [two types of Pipelines](https://docs.kuberocketci.io/docs/operator-guide/ci/tekton-overview): `CodeReview` - triggers on Review, `Build` - triggers on Merged Event.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab) and Pipelines.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab, BitBucket) and Pipelines.
- `Resources` - Kubernetes resources, that are used from Pipelines, e.g. `ServiceAccount` with [IRSA Enablement](https://docs.kuberocketci.io/docs/developer-guide/aws-reference-architecture#iam-roles-for-service-accounts-irsa), `ConfigMaps` for Maven/Gradle Pipelines, Tekton cache, CodeNarc, CTLint, and PVC to share resources between Tasks.
- `Tekton Pipeline pruner` - created as a cron job, it is designed to clear outdated pipelines.
1 change: 1 addition & 0 deletions charts/pipelines-library/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ keywords:
- gerrit
- github
- gitlab
- bitbucket
maintainers:
- name: epmd-edp
email: [email protected]
Expand Down
8 changes: 4 additions & 4 deletions charts/pipelines-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ A Helm chart for KubeRocketCI Tekton Pipelines

## Tekton Pipelines

Tekton Pipelines supports three VCS: Gerrit, GitHub, GitLab. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).
Tekton Pipelines supports four VCS: Gerrit, GitHub, GitLab and BitBucket. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).

Tekton Pipelines are implemented and packaged using the [helm-chart](./charts/pipelines-library/) approach. The helm-chart contains:

- `Tasks` - basic building block for Tekton. Some of the tasks are forks from [Upstream Tekton Catalog](https://github.com/tektoncd/catalog).
- `Pipelines`, which consist of `Tasks` and implement logic for the CI flow. KubeRocketCI follows the below approach for pipelines definition:
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab;
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab and BitBucket;
- KubeRocketCI has [two types of Pipelines](https://docs.kuberocketci.io/docs/operator-guide/ci/tekton-overview): `CodeReview` - triggers on Review, `Build` - triggers on Merged Event.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab) and Pipelines.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab, BitBucket) and Pipelines.
- `Resources` - Kubernetes resources, that are used from Pipelines, e.g. `ServiceAccount` with [IRSA Enablement](https://docs.kuberocketci.io/docs/developer-guide/aws-reference-architecture#iam-roles-for-service-accounts-irsa), `ConfigMaps` for Maven/Gradle Pipelines, Tekton cache, CodeNarc, CTLint, and PVC to share resources between Tasks.
- `Tekton Pipeline pruner` - created as a cron job, it is designed to clear outdated pipelines.

Expand Down Expand Up @@ -46,7 +46,7 @@ EDP Interceptor extracts information from VCS payload, like `repository_name`. T
The data, retrieved from the Codebase SPEC, is used in Tekton Pipelines logic.
The docker images for Interceptor are available on the [DockerHub](https://hub.docker.com/repository/docker/epamedp/edp-tekton).
The helm-chart for interceptor deployment is in the same repository by the [charts/interceptor](./charts/interceptor) directory.
Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub or GitLab with KubeRocketCI specific data.
Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub, GitLab or BitBucket with KubeRocketCI specific data.

**Homepage:** <https://docs.kuberocketci.io>

Expand Down
8 changes: 4 additions & 4 deletions charts/pipelines-library/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

## Tekton Pipelines

Tekton Pipelines supports three VCS: Gerrit, GitHub, GitLab. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).
Tekton Pipelines supports four VCS: Gerrit, GitHub, GitLab and BitBucket. To check the VCS Import strategy, please refer to the [KubeRocketCI Documentation](https://docs.kuberocketci.io)).

Tekton Pipelines are implemented and packaged using the [helm-chart](./charts/pipelines-library/) approach. The helm-chart contains:

- `Tasks` - basic building block for Tekton. Some of the tasks are forks from [Upstream Tekton Catalog](https://github.com/tektoncd/catalog).
- `Pipelines`, which consist of `Tasks` and implement logic for the CI flow. KubeRocketCI follows the below approach for pipelines definition:
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab;
- Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab and BitBucket;
- KubeRocketCI has [two types of Pipelines](https://docs.kuberocketci.io/docs/operator-guide/ci/tekton-overview): `CodeReview` - triggers on Review, `Build` - triggers on Merged Event.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab) and Pipelines.
- `Triggers`, `TriggerBindings`, `TriggerTemplates` - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab, BitBucket) and Pipelines.
- `Resources` - Kubernetes resources, that are used from Pipelines, e.g. `ServiceAccount` with [IRSA Enablement](https://docs.kuberocketci.io/docs/developer-guide/aws-reference-architecture#iam-roles-for-service-accounts-irsa), `ConfigMaps` for Maven/Gradle Pipelines, Tekton cache, CodeNarc, CTLint, and PVC to share resources between Tasks.
- `Tekton Pipeline pruner` - created as a cron job, it is designed to clear outdated pipelines.

Expand Down Expand Up @@ -47,7 +47,7 @@ EDP Interceptor extracts information from VCS payload, like `repository_name`. T
The data, retrieved from the Codebase SPEC, is used in Tekton Pipelines logic.
The docker images for Interceptor are available on the [DockerHub](https://hub.docker.com/repository/docker/epamedp/edp-tekton).
The helm-chart for interceptor deployment is in the same repository by the [charts/interceptor](./charts/interceptor) directory.
Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub or GitLab with KubeRocketCI specific data.
Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinterceptors/) paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub, GitLab or BitBucket with KubeRocketCI specific data.

{{ template "chart.homepageLine" . }}

Expand Down
2 changes: 1 addition & 1 deletion charts/pipelines-library/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Validate values of gitProviders
*/}}
{{- define "edp-tekton.validateGitProviders" -}}
{{- $allowedProviders := list "github" "gitlab" "gerrit" -}}
{{- $allowedProviders := list "github" "gitlab" "gerrit" "bitbucket" -}}
{{- range .Values.global.gitProviders }}
{{- if not (has . $allowedProviders) }}
{{- printf "Error: Invalid gitProvider %s. The gitProvider must be one of: %s" . (join ", " $allowedProviders) | fail }}
Expand Down
31 changes: 31 additions & 0 deletions charts/pipelines-library/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,34 @@ gitServers: {}
# annotations: {}
# # -- Ingress TLS configuration
# tls: []

# my-bitbucket:
# gitProvider: bitbucket
# host: bitbucket.org
# webhook:
# skipWebhookSSLVerification: false
# eventListener:
# # -- Enable EventListener
# enabled: true
# # -- EventListener resources
# resources:
# requests:
# memory: "64Mi"
# cpu: "50m"
# limits:
# memory: "128Mi"
# cpu: "500m"
# # -- Node labels for EventListener pod assignment
# nodeSelector: {}
# # -- Tolerations for EventListener pod assignment
# tolerations: []
# # -- Affinity for EventListener pod assignment
# affinity: {}

# ingress:
# # -- Enable ingress controller resource
# enabled: true
# # -- Ingress annotations
# annotations: {}
# # -- Ingress TLS configuration
# tls: []

0 comments on commit 70b5312

Please sign in to comment.