1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00
Commit Graph

22939 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
b858001c8f
Merge pull request #4851 from ryanpetrello/fix-host-key-checking
improve host key checking configurability

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2019-09-30 18:38:05 +00:00
Ryan Petrello
82be87566f
improve host key checking configurability
see: https://github.com/ansible/tower/issues/3737
2019-09-30 14:13:07 -04:00
mabashian
52b8b7676a Prevent text overlap on workflow nodes when an approval node is deleted 2019-09-30 13:38:46 -04:00
Jeff Bradberry
204c05aa3b Change the webhook post-back payload to use the job UI url 2019-09-30 13:32:23 -04:00
Jeff Bradberry
ac34b24868 Post the job or workflow url to the webhook service as part of the status 2019-09-30 13:32:23 -04:00
Jeff Bradberry
ffe89820e3 Return to using ContentType.kind
which is _not_ the `kind` attribute being deprecated.
2019-09-30 13:32:23 -04:00
Jeff Bradberry
062c4908c9 Modify the webhook debounce logic
to check if we've already previously run a job with the same webhook
GUID plus template id.  This will allow organizations to write
multiple JT/WFJTs to handle the same set of webhook events.
2019-09-30 13:32:23 -04:00
Jeff Bradberry
b6b70e55fb Address a variety of small review issues 2019-09-30 13:32:23 -04:00
Jeff Bradberry
6aa6471b7c Add help_text to the new fields 2019-09-30 13:32:23 -04:00
Jeff Bradberry
e14d4ddec6 Add a doc template to the webhook key API view 2019-09-30 13:32:23 -04:00
Jake McDermott
84dcda0a61 Use job launch_type field to detect webhook jobs
We have a launch type field for categorizing the different ways jobs
can be launched. This updates the UI to use this field when checking
if a job was launched by a webhook.
2019-09-30 13:32:23 -04:00
Jeff Bradberry
df24f5d28f Add a new launch_type of 'webhook' 2019-09-30 13:32:23 -04:00
Jeff Bradberry
fea7f914d2 Avoid the use of CredentialType.kind 2019-09-30 13:32:23 -04:00
Elijah DeLee
d4c8167b1b add arguments to awxkit for webhooks on jt or wfjt 2019-09-30 13:32:22 -04:00
Jeff Bradberry
a4873d97d8 Raise a validation error if a credential is set while the service is not 2019-09-30 13:32:22 -04:00
Jeff Bradberry
efe4ea6575 Fix the webhook receiver url for workflow jobs 2019-09-30 13:32:22 -04:00
Jeff Bradberry
b415c31b4f Fix problems with posting to Gitlab's API 2019-09-30 13:32:22 -04:00
Jeff Bradberry
e91462d085 Update the Webhook Credential help text tooltip
to make it more apparent to the user that this is an optional part of
the feature, and that failure to add a webhook credential will disable
status post-backs.
2019-09-30 13:32:22 -04:00
Jake McDermott
e85ff83be6 Apply 403 alert fixes for Workflows, too 2019-09-30 13:32:22 -04:00
Jake McDermott
d500c1bb40 Don't alert user of 403 errors for webhook key 2019-09-30 13:32:22 -04:00
Jeff Bradberry
885841caea Drop Bitbucket support
since only the Bitbucket Server product supports signed payloads,
bitbucket.org does not.  And we are requiring signed payloads.
2019-09-30 13:32:22 -04:00
Jake McDermott
f7396cf81a Always include selected webhook service in creation requests 2019-09-30 13:32:22 -04:00
Jeff Bradberry
286da3a7eb Posting webhook status now works 2019-09-30 13:32:21 -04:00
Jeff Bradberry
40b03eb6ef Enable the call to update_webhook_status
by calling it directly within send_notification_templates.  Also,
update the context field in the payload to be either 'ansible/awx' or
'ansible/tower', depending on which is being used.
2019-09-30 13:32:21 -04:00
Jeff Bradberry
c76c531b7a Provide a payload for the webhook status post-back 2019-09-30 13:32:21 -04:00
Jake McDermott
75d3359b6f make label consistent with help text 2019-09-30 13:32:21 -04:00
Jeff Bradberry
4ad5054222 Add logic to post the job status for webhooks back to the service
under some circumstances.
2019-09-30 13:32:21 -04:00
Jeff Bradberry
aa34984d7c Fix the git ref extractor for Gitlab pull requests 2019-09-30 13:32:21 -04:00
Jake McDermott
08594682a4 stub options request in workflow add unit test 2019-09-30 13:32:21 -04:00
Jeff Bradberry
d73abda5d1 Update the webhook receiver git ref extractor logic
to deal with the null-ref case, and to deal correctly with Github push events.
2019-09-30 13:32:21 -04:00
Jake McDermott
3bc91f123e add trailing '/' to webhook urls 2019-09-30 13:32:21 -04:00
Jake McDermott
41ba5c0968 add webhook fields to workflow unit test mock 2019-09-30 13:32:21 -04:00
Jeff Bradberry
e8e3a601b2 Pull out a git ref for each event type where we might care 2019-09-30 13:32:21 -04:00
Jake McDermott
b96c03e456 represent webhooks on job lists 2019-09-30 13:32:21 -04:00
Jake McDermott
5e9448a854 always show launched by webhook details if there's a webhook guid 2019-09-30 13:32:21 -04:00
Jake McDermott
6b17e86f30 add launched-by-webhook details to job runs 2019-09-30 13:32:21 -04:00
Jake McDermott
00337990db add webhook fields to workflows 2019-09-30 13:32:21 -04:00
Jake McDermott
1a33ae61a7 use key icon for webhook cred 2019-09-30 13:32:21 -04:00
Jake McDermott
5f7bfaa20a support server-side webhook key generation 2019-09-30 13:32:21 -04:00
Jeff Bradberry
178a2c7c49 Disable the authentication classes for the webhook receivers
One of them was consuming the body of the posts.  We do still need to
have an extraneous `request.body` expression, though now in
WebhookReceiverBase.post, since the `request.data` expression in the
logging also consumes the request body.
2019-09-30 13:32:20 -04:00
Jeff Bradberry
58e5f02129 Expose the new webhook fields in the job and workflow serializers 2019-09-30 13:32:20 -04:00
Jeff Bradberry
dd6c97ed87 Include a message in the webhook response 2019-09-30 13:32:20 -04:00
Jeff Bradberry
7aa424b210 Make sure that the new webhook fields are populated when firing off a job
Also, added a temporary hacky workaround for the fact that something
in our request/response stack for APIView is consuming the request
contents in an unfriendly way, preventing the `.body` @property from
working.
2019-09-30 13:32:20 -04:00
Jake McDermott
e0a363beb8 issue network calls for setting and getting webhook key 2019-09-30 13:32:20 -04:00
Jake McDermott
48eb502161 wip 2019-09-30 13:32:20 -04:00
Jake McDermott
151de89c26 add webhook credential field 2019-09-30 13:32:20 -04:00
Jake McDermott
f5c151d5c4 add webhook url field 2019-09-30 13:32:20 -04:00
Jake McDermott
17b34b1e36 add webhook service field 2019-09-30 13:32:20 -04:00
Jeff Bradberry
ee1d118752 Add the webhook receiver url to the related urls in the serializers 2019-09-30 13:32:20 -04:00
Jeff Bradberry
245931f603 Debounce when multiple copies of the same webhook event come in 2019-09-30 13:26:04 -04:00