File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ type GitLab struct {
2828 Domain string `json:"domain,omitempty"`
2929}
3030
31+ // Bitbucket is a Bitbucket SCM provider configuration. It is used to configure the Bitbucket settings.
32+ type Bitbucket struct {}
33+
3134// Forgejo is a Forgejo SCM provider configuration. It is used to configure the Forgejo settings.
3235type Forgejo struct {
3336 // Domain is the Forgejo domain, such as "codeberg.org" or "forgejo.mycompany.com".
@@ -91,6 +94,16 @@ type ForgejoRepo struct {
9194 Name string `json:"name"`
9295}
9396
97+ // BitbucketRepo is a repository in Bitbucket, identified by its workspace and repository.
98+ type BitbucketRepo struct {
99+ // Workspace is the workspace of the repository.
100+ // +kubebuilder:validation:Required
101+ Workspace string `json:"workspace"`
102+ // Repository is the repository of the repository.
103+ // +kubebuilder:validation:Required
104+ Repository string `json:"repository"`
105+ }
106+
94107// FakeRepo is a placeholder for a repository in the fake SCM provider, used for testing purposes.
95108type FakeRepo struct {
96109 // Owner is the owner of the repository.
Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ import (
2424// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
2525
2626// GitRepositorySpec defines the desired state of GitRepository
27- // +kubebuilder:validation:ExactlyOneOf=github;gitlab;forgejo;fake
27+ // +kubebuilder:validation:ExactlyOneOf=github;gitlab;forgejo;bitbucket; fake
2828type GitRepositorySpec struct {
29- GitHub * GitHubRepo `json:"github,omitempty"`
30- GitLab * GitLabRepo `json:"gitlab,omitempty"`
31- Forgejo * ForgejoRepo `json:"forgejo,omitempty"`
32- Fake * FakeRepo `json:"fake,omitempty"`
29+ GitHub * GitHubRepo `json:"github,omitempty"`
30+ GitLab * GitLabRepo `json:"gitlab,omitempty"`
31+ Forgejo * ForgejoRepo `json:"forgejo,omitempty"`
32+ Bitbucket * BitbucketRepo `json:"bitbucket,omitempty"`
33+ Fake * FakeRepo `json:"fake,omitempty"`
3334 // +kubebuilder:validation:Required
3435 ScmProviderRef ScmProviderObjectReference `json:"scmProviderRef"`
3536}
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ type ScmProviderSpec struct {
4848 // Forgejo required configuration for Forgejo as the SCM provider
4949 Forgejo * Forgejo `json:"forgejo,omitempty"`
5050
51+ // Bitbucket required configuration for Bitbucket as the SCM provider
52+ Bitbucket * Bitbucket `json:"bitbucket,omitempty"`
53+
5154 // Fake required configuration for Fake as the SCM provider
5255 Fake * Fake `json:"fake,omitempty"`
5356}
You can’t perform that action at this time.
0 commit comments