From e021d48a8847080489f72f0471d550a2645fbf7f Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 29 Jul 2022 09:00:41 +0300 Subject: [PATCH] fix: update bitbucket es example yaml (#2113) * fix: update bitbucket es example Signed-off-by: Daniel Soifer --- examples/event-sources/bitbucket.yaml | 72 +++++++++++++++------------ 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/examples/event-sources/bitbucket.yaml b/examples/event-sources/bitbucket.yaml index ccd349c5be..508dec6f48 100644 --- a/examples/event-sources/bitbucket.yaml +++ b/examples/event-sources/bitbucket.yaml @@ -10,13 +10,17 @@ spec: bitbucket: # bitbucket eventsource example with basic auth strategy example: - # key of the project - projectKey: "PROJECTKEY" - # owner of the repository - owner: "name-of-repo-owner" - # repository slug - repositorySlug: "name-of-repository" - # Bitbucket will send events to following port and endpoint + # Bitbucket repository list + repositories: + - owner: "name-of-owner" # owner of the repository + repositorySlug: "name-of-repository1" # repository slug + - owner: "name-of-owner" + repositorySlug: "name-of-repository2" + # events to listen to + # Visit https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/ + events: + - repo:push + # Bitbucket will send webhook events to the following port and endpoint webhook: # endpoint to listen to events on endpoint: /push @@ -29,11 +33,17 @@ spec: # The name for the service is in `-eventsource-svc` format. # You will need to create an Ingress or Openshift Route for the event-source service so that it can be reached from Bitbucket. url: http://url-that-is-reachable-from-bitbucket - # events to listen to - # Visit https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/ - events: - - repo:push + # Delete the webhook when the eventsource is deleted + deleteHookOnFinish: true auth: +# # oauthToken refers to K8s secret that stores the bitbucket OAuth bearer token +# # Visit https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/ +# oauthToken: +# # Name of the K8s secret that contains the oauth token +# name: bitbucket-access +# # Key within the K8s secret whose corresponding value (must be base64 encoded) is oauth token +# key: token + # basic refers to Basic Auth strategy and can be used with App passwords # Visit https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/ basic: @@ -50,25 +60,13 @@ spec: # Key within the K8s secret whose corresponding value (must be base64 encoded) is password key: password -# # oauthToken refers to K8s secret that stores the bitbucket OAuth bearer token -# # Visit https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/ -# oauthToken: -# # Name of the K8s secret that contains the oauth token -# name: bitbucket-access -# # Key within the K8s secret whose corresponding value (must be base64 encoded) is oauth token -# key: token - # Delete the webhook when the eventsource is deleted - deleteHookOnFinish: true - -# # bitbucket eventsource example with oauth bearer token auth strategy -# example-oauth-token: -# # key of the project -# projectKey: "PROJECTKEY" +# # bitbucket eventsource example with deprecated syntax using basic auth strategy +# example-with-deprecated-repo-syntax: # # owner of the repository # owner: "name-of-repo-owner" # # repository slug -# repositorySlug: "name-of-repo" +# repositorySlug: "name-of-repository" # # Bitbucket will send events to following port and endpoint # webhook: # # endpoint to listen to events on @@ -87,12 +85,20 @@ spec: # events: # - repo:push # auth: -# # oauthToken refers to K8s secret that stores the bitbucket oauth bearer token -# # Visit https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/ -# oauthToken: -# # Name of the K8s secret that contains the oauth token -# name: bitbucket-access -# # Key within the K8s secret whose corresponding value (must be base64 encoded) is oauth token -# key: token +# # basic refers to Basic Auth strategy and can be used with App passwords +# # Visit https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/ +# basic: +# # username refers to K8s secret that stores the bitbucket username +# username: +# # Name of the K8s secret that contains the username +# name: bitbucket-access +# # Key within the K8s secret whose corresponding value (must be base64 encoded) is username +# key: username +# # password refers to K8s secret that stores the bitbucket password (including App passwords) +# password: +# # Name of the K8s secret that contains the password +# name: bitbucket-access +# # Key within the K8s secret whose corresponding value (must be base64 encoded) is password +# key: password # # Delete the webhook when the eventsource is deleted # deleteHookOnFinish: true