forked from ansible/awx
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Bitbucket Data Center webhooks (ansible#14674)
Add support for receiving webhooks from Bitbucket Data Center, and add support for posting build statuses back Note that this is very explicitly only for Bitbucket Data Center. The entire webhook format and API is entirely different for Bitbucket Cloud.
- Loading branch information
1 parent
bb1922c
commit 43be90f
Showing
7 changed files
with
190 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from django.urls import re_path | ||
|
||
from awx.api.views.webhooks import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver | ||
from awx.api.views.webhooks import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver, BitbucketDcWebhookReceiver | ||
|
||
|
||
urlpatterns = [ | ||
re_path(r'^webhook_key/$', WebhookKeyView.as_view(), name='webhook_key'), | ||
re_path(r'^github/$', GithubWebhookReceiver.as_view(), name='webhook_receiver_github'), | ||
re_path(r'^gitlab/$', GitlabWebhookReceiver.as_view(), name='webhook_receiver_gitlab'), | ||
re_path(r'^bitbucket_dc/$', BitbucketDcWebhookReceiver.as_view(), name='webhook_receiver_bitbucket_dc'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Generated by Django 4.2.6 on 2023-11-16 21:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('main', '0187_hop_nodes'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='job', | ||
name='webhook_service', | ||
field=models.CharField( | ||
blank=True, | ||
choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('bitbucket_dc', 'BitBucket DataCenter')], | ||
help_text='Service that webhook requests will be accepted from', | ||
max_length=16, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='jobtemplate', | ||
name='webhook_service', | ||
field=models.CharField( | ||
blank=True, | ||
choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('bitbucket_dc', 'BitBucket DataCenter')], | ||
help_text='Service that webhook requests will be accepted from', | ||
max_length=16, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='workflowjob', | ||
name='webhook_service', | ||
field=models.CharField( | ||
blank=True, | ||
choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('bitbucket_dc', 'BitBucket DataCenter')], | ||
help_text='Service that webhook requests will be accepted from', | ||
max_length=16, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='workflowjobtemplate', | ||
name='webhook_service', | ||
field=models.CharField( | ||
blank=True, | ||
choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('bitbucket_dc', 'BitBucket DataCenter')], | ||
help_text='Service that webhook requests will be accepted from', | ||
max_length=16, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters